ASP.NET page validation

asp.netvalidation

I have a requirement wherein I have a bunch of about 10 aspx pages.The user shall be able to go from one screen to another using navigation.All the range , custom,regex validators need to file so that data enetered is correct.Required fields need not be entered at this stage and the user can skip required fields. On the last page, I need to find out all the fields which are required and if incomplete want to show the user, these fields are required, sort of summary with link to the page where the control was left blank.
Does any one have any good ideas to achive validation on pages which the user has left and can do validation at the very end before the data is submitted. Any pointers would be greatly appreciated.

Best Answer

Validators form part of the page on which they lie. You cannot use the built-in validator controls to validate input fields on previous pages in the sequence. If you must do it this way, then you should implement your own validation framework which validates data on each page, but provides feedback on the summary page.

You should look into the usability issues faced if you only give feedback to the user at the end of the sequence of pages. He/she will be required to go back a few pages and retry input there. I don't think that is a good option at all.

A much better option would be to use the ASP.NET Wizard control (which loads sequential UI in separate panels, but on the same page). That would enable you to use Validators in conjunction with your setup. This article by Steve C. Orr provides a good introduction to using Validators with the Wizard control.

Alternatively, you can use the AJAX Tab control as others have suggested.