WebUIValidation.js

M

Morten

Hi!

I've developed an application that uses forms based authentication. The
logon page uses the file WebUIValidation.js a couple of places and the file
is located in the right place on the server. I have a user who uses a Linux
browser which gives the following error when he tries to log in:

http://server/aspnet_client/system_web/1_1_4322/WebUIValidation.js:
SyntaxError: Parse error at line 342

It works without errors in IE6. Does anybody have any idea if this is
something that I can fix somehow?

Best regards

Morten
 
C

Chris R. Timmons

Hi!

I've developed an application that uses forms based
authentication. The logon page uses the file WebUIValidation.js
a couple of places and the file is located in the right place on
the server. I have a user who uses a Linux browser which gives
the following error when he tries to log in:

http://server/aspnet_client/system_web/1_1_4322/WebUIValidation.j
s: SyntaxError: Parse error at line 342

It works without errors in IE6. Does anybody have any idea if
this is something that I can fix somehow?

Morten,

Not sure why the Linux browser is choking on that code...

A simple but drastic fix would be to turn off client-side validation
for all of the validators on the page (set EnableClientScript to
false).

Another way would be to conditionally turn client-side validation on
or off depending on which browser requested the page:

// Untested code.
private void Page_Load(object sender, System.EventArgs e)
{
bool canBrowserHandleValidation =
(this.Request.Browser.Type.ToUpper() == "IE6");

foreach (Control ctrl in this.Controls)
{
if (ctrl is BaseValidator)
((BaseValidator) ctrl).EnableClientScript =
canBrowserHandleValidation;
}
}
 
B

bruce barker

WebUIValidation.js uses proprietary IE methods and will choke any other
browser, for this reason .net usually suppresses client validation for any
browser other than IE. for some reason, the .net browser detect code thinks
the linux browser is IE, you need to update your browsercaps file.

-- bruce (sqlwork.com)
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top