ASP.NET 1.1无法提交的问题
2005-02-25 17:22
295 查看
今天在产品里发现了一个bug,多个aspx页面都无法提交,点了提交按纽都没有反应,初步猜测是Validate的问题。详细的解决过程就不写了,将最后的结论总结如下:
.NET Framework 1.1的补丁对Validator有影响,如果使用补丁前的WebUIValidation.js,会导致包含有Validators的页面无法提交。
打补丁前,WebUIValidation.js中的ValidatorCommonOnSubmit如下:
protected void RegisterValidatorCommonScript()
protected void RegisterValidatorCommonScript()
if (this.Page.IsClientScriptBlockRegistered("ValidatorIncludeScript"))
return;
}
string text1 = Util.GetScriptLocation(this.Context);
string text2 = HttpRuntime.FormatResourceString("Validator_missing_script", text1 + "WebUIValidation.js");
string text3 = HttpRuntime.FormatResourceString("Validator_wrong_script", "WebUIValidation.js", "125", "\" + Page_ValidationVer + \"");
string text4 = string.Empty;
if (this.Page.Request.IsLocal)
object[] objArray1 = new object[3] text4 = string.Format("\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n<!--\r\nvar Page_ValidationActive = false;\r\nif (typeof(clientInformation) != \"undefined\" && clientInformation.appName.indexOf(\"Explorer\") != -1) {{\r\n if (typeof(Page_ValidationVer) == \"undefined\")\r\n alert(\" }
else
text4 = string.Format("\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n<!--\r\nvar Page_ValidationActive = false;\r\nif (typeof(clientInformation) != \"undefined\" && clientInformation.appName.indexOf(\"Explorer\") != -1) {{\r\n if ((typeof(Page_ValidationVer) != \"undefined\") && (Page_ValidationVer == \" }
this.Page.RegisterClientScriptFileInternal("ValidatorIncludeScript", "javascript", text1, "WebUIValidation.js");
this.Page.RegisterStartupScript("ValidatorIncludeScript", text4);
this.Page.RegisterOnSubmitStatement("ValidatorOnSubmit", "if (!ValidatorOnSubmit()) return false;");
}
花了些时间找出问题原因,记录下来,以便查询。
再有就是建议没有打.NET Framework 1.1补丁的,尽早打补丁,同时不要在发布产品的时候发布任何.NET Framework中带的文件,包含.js和.dll。
.NET Framework 1.1的补丁对Validator有影响,如果使用补丁前的WebUIValidation.js,会导致包含有Validators的页面无法提交。
打补丁前,WebUIValidation.js中的ValidatorCommonOnSubmit如下:
protected void RegisterValidatorCommonScript()
protected void RegisterValidatorCommonScript()
if (this.Page.IsClientScriptBlockRegistered("ValidatorIncludeScript"))
return;
}
string text1 = Util.GetScriptLocation(this.Context);
string text2 = HttpRuntime.FormatResourceString("Validator_missing_script", text1 + "WebUIValidation.js");
string text3 = HttpRuntime.FormatResourceString("Validator_wrong_script", "WebUIValidation.js", "125", "\" + Page_ValidationVer + \"");
string text4 = string.Empty;
if (this.Page.Request.IsLocal)
object[] objArray1 = new object[3] text4 = string.Format("\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n<!--\r\nvar Page_ValidationActive = false;\r\nif (typeof(clientInformation) != \"undefined\" && clientInformation.appName.indexOf(\"Explorer\") != -1) {{\r\n if (typeof(Page_ValidationVer) == \"undefined\")\r\n alert(\" }
else
text4 = string.Format("\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n<!--\r\nvar Page_ValidationActive = false;\r\nif (typeof(clientInformation) != \"undefined\" && clientInformation.appName.indexOf(\"Explorer\") != -1) {{\r\n if ((typeof(Page_ValidationVer) != \"undefined\") && (Page_ValidationVer == \" }
this.Page.RegisterClientScriptFileInternal("ValidatorIncludeScript", "javascript", text1, "WebUIValidation.js");
this.Page.RegisterStartupScript("ValidatorIncludeScript", text4);
this.Page.RegisterOnSubmitStatement("ValidatorOnSubmit", "if (!ValidatorOnSubmit()) return false;");
}
花了些时间找出问题原因,记录下来,以便查询。
再有就是建议没有打.NET Framework 1.1补丁的,尽早打补丁,同时不要在发布产品的时候发布任何.NET Framework中带的文件,包含.js和.dll。
相关文章推荐
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方案
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方法
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方案
- 解决在IIS7.0上部署ASP.NET1.1站点时【“/”应用程序中的服务器错误。无法识别的配置节“system.webServer”】的问题
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方案
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方法
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方案
- 在ASP.NET下使用jQuery UI Dialog 无法提交问题
- “Visual Studio.net已检测到指定的Web服务器运行的不是Asp.net1.1版。您将无法运行Asp.net Web应用程序或服务”问题的解决方法
- ASP.NET在线用户列表精确版——解决用户意外退出在线列表无法及时更新问题
- 检测到的Web服务器不是ASP.net1.1版本,无法运行ASP.net程序
- 解决 asp.net 伪静态 IIS设置后 直正HTML无法显示的问题
- ASP.NET WebApi 自带Json返回日期带T无法格式化的问题
- 从ASP.NET1.1升级到ASP.NET2.0要考虑的Cookie问题
- 关于ASP.NET 无法连接MySql数据库的问题和解决方法
- ASP.NET在线用户列表精确版——解决用户意外退出在线列表无法及时更新问题
- 无法加载 DLL gdiplus.dll 的问题解决方法-asp.net
- Asp.Net服务器发送HTTP标头后无法设置内容类型的问题解决
- asp.net 1.1 部分按钮不能提交 - canNOT submit issue
- ASP.NET下的表单提交问题