ViewState Problem
-
Hey all, I'm having this weird problem with an aspx page. In this page I have 2 dropDownList controls: _TableDropDown - has items that I entered at design time. the items are: Cities, Titles etc.. _RowsDropDown - filled after _TableDropDown is autoPostBack to server from DB(when selecting Cities of _TableDropDown the _RowsDropDown is filled with YNC, Paris etc.. and when selecting Titles of _TableDropDown the _RowsDropDown is filled with Manager, Developer etc...) everything is ok until I press the back button.:sigh: this is what I did from IE: 1. got the page the first time - the _TableDropDown with Cities and _RowsDropDown with the data from DB. 2. changed the _TableDropDown value to Titles - postback occured and the page got back to me with the right data. 3. press back button - now the _TableDropDown is set with Titles value BUT _RowsDropDown values filled with cities data.. I know that when pressing back button of IE there is NO postback to the server so I guessed it's something with the viewState... Is someone familier with the problem? What should I do to get over this?:(( Thank you very much, RoyRose
-
Hey all, I'm having this weird problem with an aspx page. In this page I have 2 dropDownList controls: _TableDropDown - has items that I entered at design time. the items are: Cities, Titles etc.. _RowsDropDown - filled after _TableDropDown is autoPostBack to server from DB(when selecting Cities of _TableDropDown the _RowsDropDown is filled with YNC, Paris etc.. and when selecting Titles of _TableDropDown the _RowsDropDown is filled with Manager, Developer etc...) everything is ok until I press the back button.:sigh: this is what I did from IE: 1. got the page the first time - the _TableDropDown with Cities and _RowsDropDown with the data from DB. 2. changed the _TableDropDown value to Titles - postback occured and the page got back to me with the right data. 3. press back button - now the _TableDropDown is set with Titles value BUT _RowsDropDown values filled with cities data.. I know that when pressing back button of IE there is NO postback to the server so I guessed it's something with the viewState... Is someone familier with the problem? What should I do to get over this?:(( Thank you very much, RoyRose
If there is no postback, then viewstate cannot have anything to do with it
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
If there is no postback, then viewstate cannot have anything to do with it
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
There is no postback & it's find with me cause I don't need anything from the server. All I want is that when I press IE's back button it'll go to the state it was and not to an imposible state!
The way to do this, is to store the value in the URL, and to do a redirect to that URL, on postback. Otherwise, the step where you changed the value of one, but the other was not changed, is a page in IE's history. That's what you're stepping back to.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )