This is a migrated thread and some comments may be shown as answers.

Problem with view state when adding a custom WebUserControl to a dynamically created PageView

3 Answers 44 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 10 Jun 2010, 08:07 PM
I'm trying to add a dynamically created web user control to a dynamically created web Page View.  The problem I'm having is that the webcontrol posts back to show or hide diffrent controls, as well as to dynamicly create them.  When ever it posts back the PageView dosn't store it's viewstate.  Just as a first try I tried to use an update panel in the webcontrol but that didn't work.  I'm not going to put any code because my code works fine it's just that the Page View forgets my web control exists.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 14 Jun 2010, 03:39 PM
Hi Alex,

Could you please send us some sample code which we can test locally? Thanks

Greetings,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Sonia
Top achievements
Rank 1
answered on 15 Aug 2011, 11:16 PM
Hi Yana,

I am having trouble loading WebUserControl (ascx) controls DYNAMICALLY and keeping controls viewstate.  I have to load web user control in pageInit event of hosting page and find out the currently selected tab and load the control. 

Do you have any sample for loading ascx controls on demand?

Thanks,
0
Kate
Telerik team
answered on 18 Aug 2011, 09:42 AM
Hi Sonia,

Please take a look at this demo where a similar scenario is being exemplified.  

Best wishes,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TabStrip
Asked by
Alex
Top achievements
Rank 1
Answers by
Yana
Telerik team
Sonia
Top achievements
Rank 1
Kate
Telerik team
Share this question
or