473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 1626
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: BK | last post by:
I'm having a really strange problem with and HtmlSelect server control (listbox) and a RequiredFieldValidator that I am trying to use to make sure that someone has items in the listbox. The way...
3
by: Navin | last post by:
Hello friends... On a single asp.net web page i have a single server-side form that contains a couple of user-controls. Each user control has its own functionality and contains server-side textbox...
3
by: me | last post by:
Is there any particular reason why a requiredfieldvalidator cant validate a listbox? I have bound the two together but the validator always returns false on isvalid and so does the Page, no matter...
1
by: peshrad | last post by:
Hi ! I'm using Visual Studio .NET to program a Web application coding in C#. In my form I use an HtmlSelect control that calls a JavaScript function when the selected item changes. This...
4
by: James | last post by:
Hello, I have a RequiredFieldValidator for several textbox controls on a form. Here's an example with the RequiredFieldValidator. EnableClientScript, Enabled, and Visible are set to true for...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
2
by: Hongbo | last post by:
Hi, I have a Asp.Net written in C#. It serve as information input form. The form encounters sort of random problem with the email field and state field. I have validator attached with these 2...
1
by: Arpan | last post by:
Suppose I have the following RequiredFieldValidator control which validates a TextBox: <form id="form1" runat="server"> <asp:TextBox id="txtVal" runat="server"/> <asp:RequiredFieldValidator...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.