Solved

Problem with asp.net Validators

Posted on 2004-04-26
11
230 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 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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