471,123 Members | 850 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

Is the RequiredFieldValidator a reliable control if supported with sensible form level coding?

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
Nov 19 '05 #1
5 1534
> 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.
Have them post what their problems were so we can set the straight. Perhaps
they were doing something wrong or perhaps they were expecting too much from
them.
Are they robust, consistent, and reliable controls or not !!??? I
would really appreciate some wisdom here from veteran ASP.NET'ers.


In my expereicne they are sufficient. It's a nice little validation framework
that deal with most of the tedious details of javascript validation you used
to have to do manually. One note is that they only do client side validation
is your browser has the initialis "I" and "E" and is at least version 5 (I
think it's version 5, IIRC). They always do server side validation as well
(regardless of the browser), which is important for security. The validation
controls take you about 80% of the way and with the CustomValidator you can
cover the other 20% of wacky scenarios you might have.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #2
Thank you so much Brock.
If they are considered sufficient for a developmentor instructor, they are
good enough for me.
Since this is an intranet app and IE is the browser, that browser req'mnt is
not a problem.
I didn't realize that the RequiredFieldValidator was validating on the
server in addition to its work on the client.
Appreciatively,
-hazz

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:33**********************@msnews.microsoft.com ...
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.


Have them post what their problems were so we can set the straight.
Perhaps they were doing something wrong or perhaps they were expecting too
much from them.
Are they robust, consistent, and reliable controls or not !!??? I
would really appreciate some wisdom here from veteran ASP.NET'ers.


In my expereicne they are sufficient. It's a nice little validation
framework that deal with most of the tedious details of javascript
validation you used to have to do manually. One note is that they only do
client side validation is your browser has the initialis "I" and "E" and
is at least version 5 (I think it's version 5, IIRC). They always do
server side validation as well (regardless of the browser), which is
important for security. The validation controls take you about 80% of the
way and with the CustomValidator you can cover the other 20% of wacky
scenarios you might have.
-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #3
Well, I specifically used the word sufficient on purpose. They work well
in all of the situations where I've needed them to. But there are thrid party
validation controls out there. So to some people the built-in ones are not
sufficient. I'd say use the built-in ones until they can't handle what you
need/want anymore then if it's important consider the third party ones. But,
like I said, for all of the apps I've been building in ASP.NET, the built-in
ones have been sufficient :)

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thank you so much Brock.
If they are considered sufficient for a developmentor instructor, they
are
good enough for me.
Since this is an intranet app and IE is the browser, that browser
req'mnt is
not a problem.
I didn't realize that the RequiredFieldValidator was validating on the
server in addition to its work on the client.
Appreciatively,
-hazz
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:33**********************@msnews.microsoft.com ...
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.

Have them post what their problems were so we can set the straight.
Perhaps they were doing something wrong or perhaps they were
expecting too much from them.
Are they robust, consistent, and reliable controls or not !!??? I
would really appreciate some wisdom here from veteran ASP.NET'ers.

In my expereicne they are sufficient. It's a nice little validation
framework that deal with most of the tedious details of javascript
validation you used to have to do manually. One note is that they
only do
client side validation is your browser has the initialis "I" and "E"
and
is at least version 5 (I think it's version 5, IIRC). They always do
server side validation as well (regardless of the browser), which is
important for security. The validation controls take you about 80% of
the
way and with the CustomValidator you can cover the other 20% of wacky
scenarios you might have.
-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #4
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

Nov 19 '05 #5
Thank you for your response Peter and for making me aware of some of the
caveats and limitations.
And thank you for making me aware of the alternative you provide.
-hazz

"Peter Blum" <PL****@Blum.info> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
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


Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by James | last post: by
2 posts views Thread by Hongbo | last post: by
1 post views Thread by Arpan | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.