Welcome Guest Search | Active Topics | Sign In | Register

CallbackPanel was initially dynamically loaded Options
Mike Eyal
Posted: Thursday, January 28, 2010 12:23:42 AM
Rank: Member
Groups: Member

Joined: 10/19/2009
Posts: 11
Hi,

I know this issue has been discussed on the forum before, but I have been unable to get around the issue with your suggestions.
I have a TabStrip, where when a tab header is selected a user control is loaded into the pageview. This user control has callbacks inside it, which are failing when executed with the error as mentioned in the subject of this post.
I have constraints on the project where page postbacks are to be avoided. But the pages get very large and slow, so dynamically loading is a good option - please help.
Do you have a step by step best practices to follow?

Thanks

Mike
eo_support
Posted: Thursday, January 28, 2010 7:54:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

There really isn't a step by step practice because the implementation and actual scenario can vary. The most common error is when your page is reloaded your did not reload the control you previous dynamically loaded. ASP.NET remembers changes you made on control properties. But it does not remember changes you made to the control TreeView (such as dynamically added control). So you need to remember what you have loaded and restore it exactly as is when the page comes back. This is a quite general rule that applies to all dynamic loading.

Our sample project use dynamic loading to load every sample. So you can take a look of that to see a working implementation. As pointed out above, that is by no mean the only possible implementation. The key is you must reload what you previous loaded, however you do it doesn't matter.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.