Click here to Skip to main content
15,886,851 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello All,

i'm migrating asp.net 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


JavaScript
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;
             }
         }
     }


and here's the custom vaildator tag :

ASP.NET
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="ddl_productsmanageapp" runat="server"
                                                      ClientValidationFunction="ProductsReqValidationManageApp" ErrorMessage="Required Field" Display="Dynamic" Font-Bold="True"></asp:CustomValidator>



thanks in advance,
Posted

1 solution

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:

http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900