Event handling for a dynamically added user control
<p>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 </p>

<p>I get this code </p>

<pre><code>var uc = Page.LoadControl("~/blah/VendorProductSearch.ascx") as VPSearch;
uc.ShowVPSearch(true);
_tempPlaceHolder.Controls.Add(uc);
</code></pre>

<p>it works fine the control gets loaded properly but onclick of any button the second time the control disappears ???</p>

<p>I want the dynamically added control to remain until the user clicks on the cancel button </p>

<p>Any idea as to how to achive this ?</p>

<p>Thanks &amp; Regards,
Francis P.</p>
