本文介绍了自定义vaildators不适用于IE10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All, 我正在迁移asp应用程序以兼容IE10和旧的asp自定义版本 不起作用,你没有调用customer validator中指定的clientvalidation函数这里是代码
Hello All, i'm migrating asp application to be compatible with IE10 and old asp custom vaildation(s) doesn't work, thee's no call to the clientvalidationfunction specified in the custome validator here's the code
function ProductsReqValidationManageApp(source, args) { alert(args); alert(source); if (document.getElementById("trmanageappproducts").style.visibility == 'visible') { var ddl_ProductsCheckBool = document.getElementById("ddl_productsmanageapp").value; if (ddl_ProductsCheckBool != "0" && ddl_ProductsCheckBool != "" && ddl_ProductsCheckBool != null) { args.IsValid = true; return; } else { args.IsValid = false; return; } } }这里是自定义vaildator标签:
and here's the custom vaildator tag :
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="ddl_productsmanageapp" runat="server" ClientValidationFunction="ProductsReqValidationManageApp" ErrorMessage="Required Field" Display="Dynamic" Font-Bold="True"></asp:CustomValidator>提前感谢,
thanks in advance,
推荐答案这类问题主要与.NET框架和浏览器定义文件。 .NET无法正确识别浏览器定义字符串,并将IE 10,IE 11版本作为未知浏览器处理,因此也存在问题。 如果您使用的是.NET Framework 4.0 ,只需安装.NET framework 4.5即可解决问题。您无需对您的申请进行任何更改。 您可以获得更多帮助: www.hanselman/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx [ ^ ] Such issues are mostly related to the .NET framework and browser definition files. .NET does not recognise the browser definition string correctly and handle IE 10, IE 11 versions as unknown browsers and hence the issue. If you are using .NET framework 4.0, the issues will be fixed by simply installing .NET framework 4.5. You will not need to make any changes to your application. You can get some more help at: www.hanselman/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx[^]
更多推荐
自定义vaildators不适用于IE10
发布评论