Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ValidationSummary problem

Status
Not open for further replies.

jby1

Programmer
Apr 29, 2003
403
GB
Hi

I have a webpage which consists of a number of user controls, some buttons, and a Validation Summary. There are numerous validation controls within the controls, and also one on the main page. The idea is that errors will be shown in the one Validation Summary on the main page. This has been working absolutely fine for me in development for some months, but now I have deployed the application the Validation Summary no longer displays any error messages.

Have anybody any idea why this may be so, or how I might work around this?

Thanks!
 
Are the standard validation controls working fine?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Yes, it is just failing to display the summary.
 
Hmmm...very odd! I don't really know what to suggest other than trying a simple test harness and seeing if the problem is generic or just something in your application. Try making a simple page with two validation controls and a summary. Try it on both dev and production and see what the results are.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thanks for the advice! I will try it, and see what happens.

Probably should have thought of doing that myself anyway, but sometimes a problem stops one from thinking properly!
 
Tried that, and it worked on the server with my simple version.

Clearly there is something wrong with the way I have done it, although it still seems odd to me that it should work ok on my own PC but not on the test server.
 
Well at least it narrows the problem down to the actual application itself , so now it's just a case of seeing what's going on in there (or isn't going on!).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I have found something that may be significant.

A look at the page source when I run it locally (and it works) reveals the following javascript function:

<code>
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" && clientInformation.appName.indexOf("Explorer") != -1) {
if (typeof(Page_ValidationVer) == "undefined")
alert("Unable to find script library '/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing this file manually, or reinstall by running 'aspnet_regiis -c'.");
else if (Page_ValidationVer != "125")
alert("This page uses an incorrect version of WebUIValidation.js. The page expects version 125. The script library is " + Page_ValidationVer + ".");
else
ValidatorOnLoad();
}
</code>

When I run it on the server, I get this javascript function:

<code>
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" && clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer == "125"))
ValidatorOnLoad();
}
</code>

It is also notable that the application uses Page Inheritance. The Validation Summary doesn't appear on inherited pages on the server (but does locally!). If I refer to a page which inherits directly from System.Web.UI.Page, the ValidationSummary does appear as expected.

The page base class does nothing, as far as I can see, that should effect the ValidationSummary when it is run on the server, as opposed to locally.

I am wondering if there might be a .NET Framework version issue here. Does this rung true with anybody? I am currently in the process of trying to find another server to test this theory on!
 
If you are getting different javascript functions for the controls, then I'd say it's definately a framework version problem.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
An installation of the framework SP1 resolved the issue. (downloaded from the microsoft website, for the benefit of any future person that encounters this issue!)

Again, thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top