How to maintain state w/DropDownList populated from database?

  • Thread starter Thread starter ESmith
  • Start date Start date
E

ESmith

I have a dropdownlist that I populate from my database when the page loads.
If I don't have autopostback enabled, I don't see the user's changed
selection, but if I enable autopostback and do not reload the dataitems,
nothing is there, and if I enable retrieving values from the database, the
selection isn't saved. I've tried enableviewstate and autopostback - what's
the best way to do this?
 
Wrap your DropDownlist in:-

If not Page.IsPostback then
(Your DropDown)
End If

Patrick
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top