Event handling for a dynamically added user control
- by francisf
Hi,
I have a user control say SearchVendor.ascx which contains 4 buttons a gridview and another user control.
I need to load the control dynamically actually as a modal pop up
I get this code
VendorProductSearch uc = Page.LoadControl("~/Controls/Proposal/VendorProductSearch.ascx") as VendorProductSearch;
uc.ShowVendorProductSearch(true);
_tempPlaceHolder.Controls.Add(uc);
it works fine the control gets loaded properly but onclick of any button the second time the control disappears ???
I want the dynamically added control to remain until the user clicks on the cancel button
Any idea as to how to achive this ?
Thanks & Regards,
Francis P.