Resetting validation controls + validation summary.

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi all

I have a page with 2 drop down lists, and a button. The user is responsible for picking data from each dd list and clicking the button, the system will respond by validating the users selection and passing the data as parameters to a crystal report, which will display some data based on the value of the parameters passed in a .pdf version of the crystal report.

I have a set of validators that are suppose to ensure that the data in the second ddlist is greater that the first ddlist. This it does, and it displays the error message in validation summary.

My problem is as follows...suppose the user firstly decided to ignore the instructions provided and selects a value from the second ddlist that is less than the first ddlist. Ok, my validators kick in, and lets them know what they have done wrong. Now they go off and select a new value from the second ddlist that is greater that the value in the first ddlist. They click the generate report and the report is displayed. Now the catch is...when the user clicked the generate button, the validation summary was still displaying the error message and the validators where still displaying * from the first attempt. I can't seem to get rid of the data/ reset the validation summary or the validators so that when the user is finished with their report and click on the back button of the browser, the validation statements are still displaying on the first page.

Any suggestions on how to correct this problem without having to go and use post-back on both ddlists (I have been told, in any case, that this is not an option).

Mike55.
 
Last edited:
Back
Top