DropDown list selections with IE Back button
I am writing an c#/ASP.NET 1.1 application, and one of the forms has 2 drop-down lists. I have set the autopostback = false and enableviewstate=true. The drop-down lists have their selections set on page_load inside of the typical if (! IsPostBack). When the form is loaded via the Response.Redirect, the drop-down list selections are set correctly, but if the IE Back button is used, the selection values are not retained as the text box values are.
To further explain, the form with the drop-down lists contains details about one specific person. One of the lists on the form contains gender values - Male and Female, which are hard-coded as list items in the HTML, and there are a text boxes for first name and last name. These 3 controls are filled on Page_load. This form is loaded from a search form (setting the patient ID in a session object and then using the Response.Redirect).
If I do the following
1. Select a female from the search form
2. Go back to the search window using a button on the form
3. Select a male from the search form
4. Go back to the search window using a button on the form
5. Click IE's Back button
*** takes me back to the patient details form and data looks as expected
6. Click IE's Back button again
*** takes me back to the search form as expected
7. Click IE's Back button again
*** shows me the search form without my search criteria entered as expected
8. Click IE's Back button again
*** takes me back to the patient details form and the name is still the male's name, BUT the gender list says FEMALE.
Any idea why?
Thanks for reading, and thanks in advance for your help!
|