By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,854 Members | 869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,854 IT Pros & Developers. It's quick & easy.

Dynamically Add User Control - Loads Twice

P: n/a
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?

Thanks,
yohaas

Oct 12 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.