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. Advertisements

  2. sonic_soul

    KJ Guest

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

  3. Himanshu Dhami, Aug 14, 2003
    #3
    1. Advertisements

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. Teo Lachev
    Replies:
    0
    Views:
    489
    Teo Lachev
    Jul 1, 2003
  2. Tim T
    Replies:
    7
    Views:
    657
    Adam Carden
    Nov 1, 2003
  3. Danny Bloodworth

    Events in dynamically loaded user controls

    Danny Bloodworth, Nov 20, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    694
  4. Josh
    Replies:
    1
    Views:
    9,807
    Jeffrey Palermo [MCP]
    May 26, 2004
  5. Alan Silver
    Replies:
    6
    Views:
    3,076
    Alan Silver
    Aug 9, 2005
  6. =?Utf-8?B?V291dGVy?=

    Dynamically Loaded controls loading other controls

    =?Utf-8?B?V291dGVy?=, Feb 27, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    683
    =?Utf-8?B?V291dGVy?=
    Feb 27, 2006
  7. james
    Replies:
    3
    Views:
    474
    James
    Jul 13, 2006
  8. Tim T
    Replies:
    6
    Views:
    341
    Tim T
    Oct 31, 2003
Loading...