when loading user controls dynamically, problem on postback

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sonic_soul

    #1

    when loading user controls dynamically, problem on postback

    basically im using a usercontrol to load other user controls, but
    cannot read their user input on postback.

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

    <my:control>
    <asp:Panel id="ECertificat ePanel" runat="server" />
    <asp:Panel id="BillingAddr essPanel" 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.
Working...