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

4 posts, 0 answers
  1. Alex
    Alex avatar
    34 posts
    Member since:
    Jun 2009

    Posted 10 Jun 2010 Link to this post

    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.
  2. Yana
    Yana avatar
    4604 posts

    Posted 14 Jun 2010 Link to this post

    Hi Alex,

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

    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.
  3. Sonia
    Sonia avatar
    1 posts
    Member since:
    Jun 2006

    Posted 15 Aug 2011 Link to this post

    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?

  4. Kate
    Kate avatar
    1898 posts

    Posted 18 Aug 2011 Link to this post

    Hi Sonia,

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

    Best wishes,
    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.

Back to Top