Dropdown list not retaining values

Results 1 to 2 of 2

Thread: Dropdown list not retaining values

  1. #1
    Join Date
    Dec 1969

    Default Dropdown list not retaining values

    I have 3 dropdown boxes above a datagrid on my page. The user selects values from the dropdowns and then clicks a button to populate the datagrid. When the I call datagrid1.databind() the datagrid is populated correctly, however the values in my dropdown list are not being retained. I have autopostback set to true on the dropdowns.<BR><BR>Thanks for any ideas on this...

  2. #2
    Join Date
    Dec 1969

    Default RE: Dropdown list not retaining values

    Autopostback doesn&#039;t maintain viewstate. That tells it to post back to the server and handle a change event, for instance the SelectedIndexChanged event. It&#039;s the EnableViewState property that you want to be sure is set to true. I thought that true was the default, though. Anyway, you might just try setting that property specifically. I believe ViewState can be set by machine, application, page and control, so if it&#039;s turned off at any of those levels it needs to be overwritten at a lower level. Hope that helps.<BR><BR>Sara

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts