Advertise with us

Page_ClientValidate in undefined

Posted by  Ankita Pandey
 2287  View(s)
Rate this:

I have an user control which is plugged into both and MVC pages

When the control is on an page the client validation in it works fine but when the control is on an MVC page the following call in the js validation fails;


with the error in Chrome: Object [object global] has no method 'Page_ClientValidate'

How can I get my client side validation to work on my mvc pages when the hyperlink button is clicked?

I need whatever the solution is to work across both MVC and ASP.Net as our site is a combination of the two

  1. Re: Page_ClientValidate in undefined

    Try something like this,

    $('#Form').submit(function () {
        if (typeof (Page_ClientValidate)== 'function') {
            if (Page_IsValid== true) {
                alert('the form is valid');
        } else {
            if ($(this).valid()) {
                alert('the form is valid');


      Modified On Apr-07-2018 06:38:46 AM