Search code examples
javascriptasp.netclient-side-validation

Page_ClientValidate is not a function


I have a client side code i'm running on localhost which works fine, but when i copy the same files to the server which runs the site, and try to do the same, the site fails to run the same code.

Specifically, this code:

var flag = window.Page_ClientValidate('vgPerosnal');

It works fine when i run it through localhost, but when i get to this line through the website, i get the next error in chrome debugger:

Uncaught TypeError: window.Page_ClientValidate is not a function

I checked to see if there function is really missing, but the file "WebUIValidation.js" which holds the function is copied as well.

I searched the web for hours for solutions with no luck. Please help me.


Solution

  • UPDATE: it turns out it was a bigger problem. the answer to it is here

    OLD: *After hours of searching i didn't find the perfect answer, including trying to reinstall .NET framework, but i managed to overcome the problem. i copied this line to the code:

    <script src="/Scripts/WebForms/WebUIValidation.js"></script>
    

    and now it works.