ASP.NET 1.1 Page_ClientValidate调试

时间:2023-01-26 03:26:44

I have an ASP.NET 1.1 application, and on my local machine the submit button on my page works fine, but when I deploy it to our development application server, I click on Submit and nothing happens.. I'm assuming that the Page_Validate() function is failing and disabling the POSTBACK, but how do I debug this and determine what is failing? It sounds like some config problem since it works great on my local machine but not on the remote server...

我有一个ASP.NET 1.1应用程序,在我的本地机器上我的页面上的提交按钮工作正常,但当我将它部署到我们的开发应用程序服务器时,我点击提交没有任何反应..我假设Page_Validate ()函数失败并禁用POSTBACK,但是如何调试它并确定失败的是什么?这听起来像是一些配置问题,因为它在我的本地机器上工作得很好,但在远程服务器上却不行......

3 个解决方案

#1


1  

Here's what happened... in ASP.NET 1.1, there was an error in the WebUIValidation.js file (supplied by microsoft and created when you run aspnet_regiis.exe), in function ValidatorCommonOnSubmit. It seems the method was missing a return statement!! If you modify this file and insert "return event.returnValue" at the end, your validations are OK. Took me a while to find this one, but once I did I googled it and it was a well known bug.

发生了什么......在ASP.NET 1.1中,在函数ValidatorCommonOnSubmit中,WebUIValidation.js文件(由microsoft提供并在运行aspnet_regiis.exe时创建)出错。看来这个方法缺少一个返回声明!如果修改此文件并在末尾插入“return event.returnValue”,则验证结果正常。花了一段时间找到这个,但是一旦我做了,我用谷歌搜索它,这是一个众所周知的bug。

#2


0  

I remember back in the day with 1.1 Visual Studio used to destroy my event handler hookups occasionally.

我记得当天回来的1.1 Visual Studio常常用来破坏我的事件处理程序连接。

If you are using Visual Studio 2003, make certain that the "generated" code still contains the event handler wireup for your control.

如果您使用的是Visual Studio 2003,请确保“生成的”代码仍包含控件的事件处理程序连线。

#3


0  

See if the aspnet_client directory of scripts is correctly installed on the server. You should have a js like this one. Otherwise execute aspnet_regiis.exe -c (see the docs)

查看服务器上是否正确安装了脚本的aspnet_client目录。你应该有像这样的js。否则执行aspnet_regiis.exe -c(参见文档)

#1


1  

Here's what happened... in ASP.NET 1.1, there was an error in the WebUIValidation.js file (supplied by microsoft and created when you run aspnet_regiis.exe), in function ValidatorCommonOnSubmit. It seems the method was missing a return statement!! If you modify this file and insert "return event.returnValue" at the end, your validations are OK. Took me a while to find this one, but once I did I googled it and it was a well known bug.

发生了什么......在ASP.NET 1.1中,在函数ValidatorCommonOnSubmit中,WebUIValidation.js文件(由microsoft提供并在运行aspnet_regiis.exe时创建)出错。看来这个方法缺少一个返回声明!如果修改此文件并在末尾插入“return event.returnValue”,则验证结果正常。花了一段时间找到这个,但是一旦我做了,我用谷歌搜索它,这是一个众所周知的bug。

#2


0  

I remember back in the day with 1.1 Visual Studio used to destroy my event handler hookups occasionally.

我记得当天回来的1.1 Visual Studio常常用来破坏我的事件处理程序连接。

If you are using Visual Studio 2003, make certain that the "generated" code still contains the event handler wireup for your control.

如果您使用的是Visual Studio 2003,请确保“生成的”代码仍包含控件的事件处理程序连线。

#3


0  

See if the aspnet_client directory of scripts is correctly installed on the server. You should have a js like this one. Otherwise execute aspnet_regiis.exe -c (see the docs)

查看服务器上是否正确安装了脚本的aspnet_client目录。你应该有像这样的js。否则执行aspnet_regiis.exe -c(参见文档)