自定义vaildators不适用于IE10

编程入门 行业动态 更新时间:2024-10-26 20:26:01
本文介绍了自定义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

本文发布于:2023-08-02 16:33:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1279333.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   不适用于   vaildators

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!