Dynamically Add User Control - Loads Twice
I am dynamically adding user control to a page using
Controls.Add(control). It seems that the Page_Load as well as the other
page rendering events (Init, PreRender etc...) get fired twice. I
assume that they are firing once by the Control.Add and once by the
actual rendering of the page.
The interesitng thing is that when it is a postback, the first time it
fires IsPostBack is true but the second time, it's false.
Any ideas what I can do to prevent this double firing?
|All times are GMT. The time now is 06:47 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.