Solved

Validations not working ASP.Net

Posted on 2003-12-10
9
1,599 Views
Last Modified: 2013-11-25
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
Comment
Question by:nishikanth
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 28

Expert Comment

by:mmarinov
Comment Utility
may be the problem is in your code behind
Can you post the code ?

B..G
0
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
is the .NET Framework installed on the Web Server?
0
 
LVL 18

Accepted Solution

by:
testn earned 100 total points
Comment Utility
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
 
LVL 8

Author Comment

by:nishikanth
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
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
 
LVL 8

Author Comment

by:nishikanth
Comment Utility
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
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 25 total points
Comment Utility
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
 
LVL 18

Expert Comment

by:testn
Comment Utility
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
 

Expert Comment

by:EdwardPierce
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

14 Experts available now in Live!

Get 1:1 Help Now