CustomValidator doesn't remember it's state after browser back button
Posted on 2004-08-23
I have an aspx page. On this page the user can make a few selections. When I hit the 'Continue' button I am validating his selections (database access). When the validation fails I set (server-side) : myValidator.IsValid = false;
The page reloads and the validator shows the error message. So far so good.
When I correct the mistake and hit the 'Continue' button, a second page loads. But before the page loads, I set : myValidator.IsValid = true;
I -SEE- the validator disappear from the page before the second page loads, which is ok. But when I click on the back button of the browser (after the second page has loaded), the validator is visible again! Even though I did IsValid = true
It looks like the application is ignoring the IsValid = true. How can I make sure the validator remains invisible?