CustomValidator Doesn't Run on FireFox

S

Steve Murphy

Do CustomValidators run on FireFox and Netscape?

If not, how do you run a client-side script for field validation, submit the
form to ASP.NET when is passes validation, and then do your server-side
processing?

Thanks in advance.
 
B

Brock Allen

In ASP.NET v1.x validation controls don't render client javascript in non-IE
browsers. In ASP.NET v2.0 they do.
 
S

Steve Murphy

Brock Allen said:
In ASP.NET v1.x validation controls don't render client javascript in
non-IE browsers. In ASP.NET v2.0 they do.

Thanks for the reply.

That's pretty much what I was afraid of.

Is it possible to use a client-side script to handle the validation first,
and then submit the page for server-side processing? Or do I just need to
completely handle validation on the server for non-IE browsers?
 
B

Bob Lehmann

In ASP.NET v1.x validation controls don't render client javascript in
non-IE
Thanks MicroSoft.

Your presumption that all Non-IE browsers are older and less capable than
your outdated browser was right on the mark.

Bob Lehmann
 
B

Brock Allen

The ASP.NET validation always does server side validation regardless of the
type of browser, so if you use it, even though you might not get the client
side support in FireFox it'll still run the validation logic on the server.
Your server events (like Click) still fires, so to see if the page passes
validation, check the IsValid property in your event handlers before taking
the data and writing is to the DB.
 
J

Jon Paal

ASP.net 1.1 validators are not reliable on non IE browsers. In all my
problem cases, the validation always worked in IE.

I have found problems with both client side and server side, when using
Firefox even though browsercap was updated.
 
S

Steve Murphy

Brock Allen said:
The ASP.NET validation always does server side validation regardless of
the type of browser, so if you use it, even though you might not get the
client side support in FireFox it'll still run the validation logic on the
server. Your server events (like Click) still fires, so to see if the page
passes validation, check the IsValid property in your event handlers
before taking the data and writing is to the DB.

The client-side validation is what I'm looking for. Server-side is no
problem; I just handle it as part of the record update process.

What I was hoping to do was handle the client-side with regular everyday
Javascript running off an HTML button. Then if the record passes validation,
have the Javascript submit the page to the server for handling there. Is
that possible?

I guess I will also want to intercept processing on a datagrid as well, and
perform client-side handling before submitting to the server.

Is this possible under ASP.NET, or am I just trying to design against its
architecture?

Thanks.
 
P

Peter Blum

There are several third party replacements to Microsoft's validators that
support client-side validation on many more browsers than IE and IE/Mac. I
make one called "Professional Validation And More"
(http://www.peterblum.com/vam/home.aspx). Its 25 validators support IE,
IE/Mac, FireFox, Netscape 6+, Mozilla, Opera 7, Safari, Camino, and OmniWeb.

I designed it to greatly reduce the amount of custom coding users experience
with the original validators. In many cases, you won't need a custom
validator because my existing validators handle the case.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top