Q: dynamically created databound controls persist but static controlsdon't

Discussion in 'ASP .Net' started by mad.scientist.jr@gmail.com, Apr 4, 2008.

  1. Guest

    I am running into a case where I am databinding a control
    (dropdown, checkboxlist, etc) to a datatable,
    caching the datatable in session,
    and on postback rebind the control.
    After postback the control loses its value.
    However if I try this with a dynamically created control,
    it maintains state just fine.
    (I would think it would be the other way around.)

    You can cut/paste my aspx and codebehind into your project from here:
    http://www.geocities.com/usenet_daughter/databind_persist_issue.htm

    How would you get the static control (CheckBoxList1)
    to maintain state after postback?
    I am curious why this is happening.

    Thanks
     
    , Apr 4, 2008
    #1
    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. Dica
    Replies:
    1
    Views:
    418
    bruce barker
    Jun 20, 2007
  2. rodchar
    Replies:
    0
    Views:
    409
    rodchar
    Nov 26, 2007
  3. Replies:
    3
    Views:
    387
  4. msimmons
    Replies:
    0
    Views:
    545
    msimmons
    Jul 16, 2009
  5. Manu
    Replies:
    0
    Views:
    187
Loading...

Share This Page