Event handling for a dynamically added user control

Posted by francisf on Stack Overflow See other posts from Stack Overflow or by francisf
Published on 2010-04-26T11:58:48Z Indexed on 2010/04/26 12:03 UTC
Read the original article Hit count: 256

Filed under:

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.

© Stack Overflow or respective owner

Related posts about ASP.NET