Solved

Problem with asp.net Validators

Posted on 2004-04-26
11
211 Views
Last Modified: 2013-11-25
Hello everyone, I have a problem with the asp.net RequiredFieldValidator.
I want the validators to run on the client side so I have left the EnableClientScript property set to True.
On my local server, everything is going right and if I try to add data in the WebForm the validators are launched on the client side (using JavaScript) without submitting to the server.
Now I have uploaded my application on a Web Server and the forn submits to the server without using the client side validation.
Any Idea about that strange problem?
0
Comment
Question by:niazid
11 Comments
 
LVL 1

Expert Comment

by:warmach
ID: 10919269
Does the client have Javascript turned on in their browser?
0
 
LVL 30

Accepted Solution

by:
SteveGTR earned 100 total points
ID: 10921761
If you run the web form from the server does it give you any more information? I had a problem where smartnavigation wasn't working. When I ran the web form on the server it came up with an error stating it couldn't find the SmartNav.js and WebUIValidation.js files.

It turns out the access properties for the inetnet\asp_client were set incorrectly.

Good Luck,
Steve
0
 
LVL 8

Assisted Solution

by:nishikanth
nishikanth earned 100 total points
ID: 10925014
go to the server and run
C:\WINDOWS\Microsoft.NET\Framework\vn.n.nnnn>aspnet_regiis.exe -c

which vn.n.nnnn is the .NET framework version that you use on the server.

It will install client side script for you.


Do you use Netscape. Validators do not work on Browsers other than IE.  other things do not render properly in Netscape, which may expalin why Netscape is not a very popular Browser.

But check for page.isValid before doing any transaction.... thought the validations may not work on the client side, it will surely work on serve side, and will check for errors.

I personally avoid Netscape like the plague, and advise everyone else to do likewise.

actually the validation will work either in ie or in netscape. however, only ie has the functionality to validate data on the clientside. aspx code on netscape will perform only server validation only. that's why the validation is kinda different.

to make it work properly, you have to check for Page.IsValid before performing any operation that requires validation in codebehind.
0
 

Author Comment

by:niazid
ID: 11277196
The problem was that our host has two versions of the .Net Framework and the "asp_client" folder contains only "WebUIValidation.js" corresponding to the older Framework. We asked them to copy the newer WebUIValidation.js file and it has worked.
the tip of nishikanth about "aspnet_regiis.exe -c" was useful, same thing for the tip of SteveGTR, so I will split the points between them

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 30

Expert Comment

by:SteveGTR
ID: 11278341
Well that's about what both nishikanth and I posted in my response. The C grade is unwarrented...
0
 

Author Comment

by:niazid
ID: 11279111
SteveGTR, excuse me but I didn't notice the grade matter, it was given accidentely.
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 11279469
I posted a message to have the grade changed.
0
 

Author Comment

by:niazid
ID: 11280889
SteveGTR, I have accepted the answer and I think it's impossible to change the grade!
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 11282693
Thanks Netminder :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now