Drop Down Box and the Back Button
-
I'm having the following problem... 1) User is on PageA.aspx, the page contains a Drop Down List with the values "A", "B", "C" and AutoPostBack set to true...Value "A" is selected. 2) User changes the Drop Down List Value to "C" 3) User click the browsers "Back" button, the page is displayed. Visually the value "C" is still selected (it should be "A"), but when I look at the source I see that "A" has the "Selected" value set. I've verified the issue with both IE and FireFox. How can I ensure that the correct value is visually selected? Any help would be appreciated.
-
I'm having the following problem... 1) User is on PageA.aspx, the page contains a Drop Down List with the values "A", "B", "C" and AutoPostBack set to true...Value "A" is selected. 2) User changes the Drop Down List Value to "C" 3) User click the browsers "Back" button, the page is displayed. Visually the value "C" is still selected (it should be "A"), but when I look at the source I see that "A" has the "Selected" value set. I've verified the issue with both IE and FireFox. How can I ensure that the correct value is visually selected? Any help would be appreciated.
Probably has to do with viewstate of the page depending on what is cached. Surprised you would have the same problem on both since IE does not refresh after the back and Mozilla (and others) do not. You could provide a means for moving back and on the server, keep count of every postback event. When the click your method to go back, you would issue the javascript to send the browser back the number of pages based on the number of postbacks you recieved. This will put them to the previous page and not the same page with different values. Rocky <>< www.HintsAndTips.com - Includes Developer Tips www.MyQuickPoll.com - 2004 Election poll is #33