maintain viewstate using dynamically loaded server controls

Discussion in 'ASP .Net Web Controls' started by Thijs, Dec 2, 2003.

  1. Thijs

    Thijs Guest

    Hello,

    Does anybody know if it's possible to maintain view state using dynamically
    loaded server controls?

    I have a couple of pages which load web controls using the
    Page.LoadControl() function. However, since my code recreates the controls
    at each request, view state is not preserved. Is there a way to work around
    this?

    Thanks in advance for your help.

    Regards,

    Thijs
    Thijs, Dec 2, 2003
    #1
    1. Advertising

  2. Thijs

    Dominic Guest

    Set the .ID attribute on your controls
    Dominic, Dec 3, 2003
    #2
    1. Advertising

  3. Thijs

    Brenda Guest

    Brenda, Dec 4, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo

    Re: Dynamically Loaded UserControl and ViewState

    S. Justin Gengo, Feb 17, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,772
    S. Justin Gengo
    Feb 17, 2004
  2. Matt Howeson
    Replies:
    0
    Views:
    1,737
    Matt Howeson
    Mar 18, 2005
  3. =?Utf-8?B?V291dGVy?=

    Dynamically Loaded controls loading other controls

    =?Utf-8?B?V291dGVy?=, Feb 27, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    494
    =?Utf-8?B?V291dGVy?=
    Feb 27, 2006
  4. steven scaife
    Replies:
    1
    Views:
    381
    steven scaife
    Oct 3, 2008
  5. J Gopinath

    How to maintain the viewstate in server control?

    J Gopinath, Jun 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    213
    J Gopinath
    Jun 2, 2004
Loading...

Share This Page