The ASPToday site has a good article on creating flexible, client-side, Javascript-based validation for your web pages. Here’s the URL:
<a href="http://www.asptoday.com/articles/20000328.htm">http://www.asptoday.com/articles/20000328.htm</a>
This is a good alternative to roundtrips to the server, if you are allowed to use client-side scripting in your application.