Hi Hazz,
The basic idea of Microsoft's validators is very good. It provides
client-side validation on IE and provides server side validation on *all*
post backs. The problems it has are:
1. Its very feature poor. Users have asked for many features. A few will be
addressed in ASP.NET 2.0 but most are not going to be addressed because the
design of these controls doesn't bode well for the changes they want. A
number of third parties have developed replacements for these validators. I
am the author of the most popular one, "Professional Validation And More"
(
http://www.peterblum.com/vam/home.aspx). In developing my stuff, I put
together a list of all of the limitations and requests users make of
Microsoft's validators:
http://www.peterblum.com/vam/valmain.aspx. Look
through it so you know what many of the complaints are. Again, just switch
to a better system and get developing your web sites. (This is true with all
of the web controls: textboxes vs DatePickers, DataGrid, Calendar, etc).
2. Its documentation, like so much of ASP.NET Development Guide, isn't
written to quickly give you the right info. For example, its hard to find an
overview that tells you to use the Page.IsValid property in your Click post
back method and use the button's CausesValidation property to turn off
validation on Cancel button. Hopefully they will improve things in ASP.NET
2.0.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Hazz" <ha**@nospameroosonic.net> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...
I needed to provide client side validation for a web forms text box, radio
button list, and drop down list.
I asked two developers I work with what they thought I should do. One said
Javascript, the other the Validation Controls.
I chose the RequiredFieldValidator although I had done considerable work
with Javascript in my ASP days.
In 3-5 minutes I had two controls validated and working. It took me a
little longer with the drop down list only because I had to append an
empty string as an item to that list so I could set that to the initial
value. I also had to disable the controls on other events and to enable
the controls on Form Load. But I loved their seemingly simple and
effective solution for the task!
I went to a meeting with my boss and two brand new programmers and
mentioned what I had done. My boss said that he had tried them but he
found the ASP.NET validation controls to be buggy. The other new developer
said he had some funny experience with them.
Are they robust, consistent, and reliable controls or not !!??? I would
really appreciate some wisdom here from veteran ASP.NET'ers.
Thank you very much. -hazz