Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2006, 11:57 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Dawn_B
Default 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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Back Button j_rumpa Javascript How-To 8 July 4th, 2007 08:29 AM
Dropdown list with multiple selections tombert ASP.NET 1.0 and 1.1 Basics 15 March 7th, 2007 07:38 PM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
Back Button abdul_owiusa General .NET 1 November 11th, 2005 09:58 AM
history.back or hitting the back button won't work lian_a Classic ASP Basics 4 July 29th, 2004 12:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.