How to make other browsers work well with my asp.net app?

F

Frank Rizzo

I am trying to make sure that my app works fine with browsers other than
IE. I am finding that many features simply don’t work on other
browsers. For instance, the Validators are actually doing validations
on server, rather than on the client. I know for sure that Mozilla or
Opera or whatever can do a silly validation on the client just as well
as IE. How can I force validations to be done on the client with such
browsers?

In general, how can I force my app to treat other browsers as it treats IE?

Thanks.
 
M

Mohammad Samara

Validators are on the client side all the time, even for IE, are you talking
about VS.NET validators? if yes then they are definitely on the client side.

m.
 
F

Frank Rizzo

Mohammad said:
Validators are on the client side all the time, even for IE, are you talking
about VS.NET validators? if yes then they are definitely on the client side.

I am using the RequiredFieldValidator and RegularExpressionValidator.
 
M

Mohammad Samara

Yes they are client side items.

Try the view source option in IE when you run the page, you will find the
script for them there.

As for other broswers, we also have no problems viewing them in Mozilla's
browsers.

Do you maybe need to run aspnet_regiis.exe-i to restore all the scripts?

m.
 
H

Hermit Dave

issues with validation controls...
yes they do have both client side and server side code...
depending upon browsers capability.. specially when you use span rendering
to show the message is limited by the browser
or rather what asp.net (or the default validation control) thinks of that
browser. try setting ShowMessageBox to true.

But even then it doesnt mean it will render it fine. If you are not satified
by the behaviour.. i would advice you to use 3rd party validation controls.
you can search this newsgroup for some... i think i have seen a similar
message in past and someone mentioned a good validation control lib.
otherwise try your luck at www.asp.net go to controls and look for
validation controls...

hth

--
Regards,

HD

Once a Geek.... Always a Geek
 
B

bruce barker

..net only outputs the client side validation code if the browser is IE. as
the validation client code uses propriety IE dom objects rather than the
standard w3c dom objects, the client code only works with IE.

you can recode the validation script to be w3c complaint so it works with
ie,netscape 6+, mozilla, opera, etc. then just lie and force the
ClientTarget to be ie.

also, notice if the broswer is not ie, it will not output width and height
styles. to get around this use the following code in onload or oninit:

if ("netscape|gecko|opera".IndexOf(this.Request.Browser.Browser.ToLower())this.ClientTarget = "Uplevel";

-- bruce (sqlwork.com)
 
F

Frank Rizzo

Mohammad said:
Yes they are client side items.

Try the view source option in IE when you run the page, you will find the
script for them there.

I know that. It does exactly that on IE browsers - that's what I said
to begin with.
As for other broswers, we also have no problems viewing them in Mozilla's
browsers.

Viewing - yes, that's no problem. The problem is that with Mozilla the
validation happens on the server, not on the client. Do View source on
Mozilla and you'll see no javascript whatsoever. ASP.NET treats it as a
down-level browser.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top