Wednesday, March 21, 2012

LoadControl issue with UpdatePanel ?

Hi,

I have a very strange problem. I'm trying to decrease traffic on a web application. To do so, i'm adding some UpdatePanel in some user controls of our app.
No problem with the first controls i modified. I had the behaviour not modified while trafic was much better.

But i have a problem with the last control. I added some update panels on it (more than with the others). Finally, there are 14 Update panels in my user control (may be one of the most complicated in this application). The user control is loaded dynamically (using LoadControl), and it worked without problem before i added the update panels. After that, the LoadControl doesn't even call the OnInit() event, and directly goes to the CreateChildControls (where the controls are not then initialized.

I have found no information about such a problem. Does anyone have information about this kind of problem ? Is there a known issue on UpdatePanel about this?

thanks for your help.
Guillaume

Hi,

I think this is an old question,It is something about Dynamicaly loading User Controls into UpdatePanel.

You can see the following threads too:

http://forums.asp.net/p/1156704/1906671.aspx#1906671

http://forums.asp.net/t/1108394.aspx

Best Regards,


Thanks for your answer.

Unfortunately, this is not where my problem is. I repeat that i have my original control, already dynamically loaded, wich works fine.

This is only after adding all update panels (I know this is too much, but i do what i can with what i have) that controls inside my dynamically added control are not initialized (variables are null) and the first event called on the control is CreateChildControls... Any idea about the source of my problem? For me, it's like if there were a limit number of UpdatePanel... but it may be something else. I have no idea and found no resource on this problem (that's why i posted)...

Thanks


Hi,

If you dynamically add your usercontorl into an updatepanel, the issue comes.

Good luck!


See this

http://geekswithblogs.net/rashid/archive/2007/08/11/Loading-UserControl-Dynamically-in-UpdatePanel.aspx


Thanks for your answers. I finally managed to do what i wanted. The issue seems to be due to the use of Triggers. When i removed the triggers (and made the work programmaticaly), it fell working :).

I think there's a problem with triggers though :(.

No comments:

Post a Comment