Solved

Problem with asp.net Validators

Posted on 2004-04-26
11
208 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

16 Experts available now in Live!

Get 1:1 Help Now