problem with dynamically loaded user controls on page PostBack

Discussion in 'ASP .Net Web Controls' started by sonic_soul, Aug 14, 2003.

  1. sonic_soul

    sonic_soul Guest

    so im using this LoadControls user control in order to load 4
    different controls onto my page into panels.

    <my:control>
    <asp:panel id="ECertificatePanel" runat="server" />
    <asp:panel id="BillingAddressPanel" runat="server" />
    ...

    my problem is this:

    in my LoadControl OnLoad, i only load theese controls if !IsPostback

    however, when the page is being posted, the controls OnLoad events are
    not being hit.

    if i remove the !IsPostback constrain, and load those controls every
    time.
    I am guessing postback loads a fresh copy of the control and user
    input is lost.
    sonic_soul, Aug 14, 2003
    #1
    1. Advertising

  2. sonic_soul

    KJ Guest

    Is viewstate turned on for the outer control?
    KJ, Aug 14, 2003
    #2
    1. Advertising

  3. Himanshu Dhami, Aug 14, 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. Tim T
    Replies:
    7
    Views:
    516
    Adam Carden
    Nov 1, 2003
  2. Peter Jaffe
    Replies:
    0
    Views:
    1,188
    Peter Jaffe
    Feb 4, 2004
  3. Alan Silver
    Replies:
    6
    Views:
    2,867
    Alan Silver
    Aug 9, 2005
  4. james
    Replies:
    3
    Views:
    389
    James
    Jul 13, 2006
  5. Tim T
    Replies:
    6
    Views:
    180
    Tim T
    Oct 31, 2003
Loading...

Share This Page