Assign a Textbox in the parent page from a ModalPopup in

Posted by Vuyiswamb under ASP.NET AJAX on 2/18/2011 | Points: 10 | Views : 3233 | Status : [Member] [MVP] [Administrator] | Replies : 1
I see a lot of people have been asking this question, some was because of the if postback check , but mine is different. i am using AjaxModalExtender to show my popup on the server side.
the breakpoints got a hit and i stepped through it and i the value get assigned to the textbox <b> txtreference.Text</b> , but when i close the modal the textbox is empty , or while the modal is open i can see the value does not reflect in the parent page. Here is the Code for invoking the modal

[code]protected void Button1_Click(object sender, EventArgs e)
AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender();

modalPop.ID = "popUp";

modalPop.PopupControlID = "ModalPanel";

modalPop.TargetControlID = "Button1";

modalPop.DropShadow = true;

modalPop.BackgroundCssClass = "modalBackground";

modalPop.CancelControlID = "btnCancel";




Thank you for posting at Dotnetfunda


Posted by: Madhu.b.rokkam on: 2/18/2011 [Member] [MVP] Bronze | Points: 25

I have done this using a normal javascript popup modal window and it works fine. where when the modal popup closes the data gets into a textbox of the parent. Any specific benefits in doing thru this AjaxPopupExtender ???

Thanks and Regards

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response