asp.net - Page_ClientValidate in undefined -


I have an asp.net user control, which is plugged in both asp.net and MVC pages

When the control happens on the asp.net page, it works fine in client verification, but when a MVC page is controlled, the following call fails in JS verification;

  Page_ClientValidate ('ValidationGroup'); With Error in Chrome: Object [Object Global] does not have any way 'Page_ClientValidate'  

How can I get my client-side verification to work on my MVC pages? The hyperlink button is clicked on?

Whatever solution I have to work on both MVC and ASP.NET, because our site is a combination of two

Try doing something like this,

  $ ('# form'). Submit (function () {if (typeof (Page_ClientValidate) == 'function') {Page_ClientValidate (); if (Page_IsValid == true) {Warning ('form is valid')}} and {if ($ (this ). Valid ()) {Warning ('form is valid');}}});    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -