?
Solved

Problem with asp.net Validators

Posted on 2004-04-26
11
Medium Priority
?
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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 400 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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
 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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