Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1608
  • Last Modified:

Validations not working ASP.Net

I have uploaded my asp.net project to my webserver

My validations both client side and server side are not working on the webserver.

I am getting this error "page_validators is undefined'.

www.mysite.com/main
here main folder is a virtual folder which contains my asp.net project.

I think it is something to do with web server side. do they need to enable or include some file?

But they do work on my local system.

---------------------
I also tried using a simple project with just a text box, a required field validator and submit button.the validations still does not work. I am just able to submit the form with out checking for errors. it does not stop me from submitting.everything works on my local server but not on the web server.
0
nishikanth
Asked:
nishikanth
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
mmarinovCommented:
may be the problem is in your code behind
Can you post the code ?

B..G
0
 
Arthur_WoodCommented:
is the .NET Framework installed on the Web Server?
0
 
testnCommented:
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.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
nishikanthAuthor Commented:
hi,

I asked my webserver to do the changes. But I got a reply from them saying that the validations and error msg box only work in IE. not in netscape,mozilla etc....

Should we do anything to show the msg nox in other browsers. The site does not have any special coding but only requiredfieldvalidatiors and simple validations. Also the tables and asp.net text box are not rendered properly???

0
 
Arthur_WoodCommented:
That may in fact be the case (where the Validation controls are applicable), though I was not aware of any such restriction.  You might want to check the Microsoft Knowledge base on this.

AW  
0
 
nishikanthAuthor Commented:
hi testn,

                I tried out your suggestion... my validations work in IE. But it does not work in netscape. no msg box is displaed for the error. but the msg is show in the label after the page refreshes... also my tables, textboxes are not rendered properly.. they are of uneven sizes... what is to be done to make it work in Netscape..
0
 
Arthur_WoodCommented:
as you have already found out, Validators do not work on Browsers other than IE.  I am also not surprised that other things do not render properly in Netscape, which may expalin why Netscape is not a very popular Browser.

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

AW
0
 
testnCommented:
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
 
EdwardPierceCommented:
Concerning client-side scripting -

If you don't have the permissions to run aspnet_regiis.exe (as in the case of a shared hosting environment), you can force the client-side validation scipts to use a specific version of the Framework by placing the following tag in the <system.web> section of the web.config file :

<webControls clientScriptsLocation="/aspnet_client/system_web/1_1_4322_0/" />



0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now