How to check Page Validate on client side JavaScript in ASP Net

0 votes
I want to check page validation on client side, like Page.Validate() but it's a server side method. Is there any client side function which can work like Page.Validate() with JavaScript?
Sep 9, 2020 in Java-Script by kartik
• 37,510 points
418 views

1 answer to this question.

0 votes

Hello @kartik,

Page_ClientValidate() will work. It returns true if the page was valid and it works fine.

If you are using ASP.NET 2.0, pass the validation group name as a parameter.
E.g.

if(Page_ClientValidate("SomeValidationGroup"))
     alert('its valid');

Otherwise if there is no validation group Page_ClientValidate("") will handle it.
E.g.

if(Page_ClientValidate(""))
     alert('its valid');

Hope it helps!!

Thank You!!

answered Sep 9, 2020 by Niroj
• 82,720 points

Related Questions In Java-Script

0 votes
1 answer

How to disable postback on an asp Button in System.Web.UI.WebControls.Button?

Hello @kartik, Use this: <asp:button runat="server".... OnClientClick="myfunction(); return false;" ...READ MORE

answered Sep 9, 2020 in Java-Script by Niroj
• 82,720 points
131 views
0 votes
1 answer

How to Scroll to the top of the page using JavaScript?

Hii @kartik, Using javascript <script> $("a[href='#top']").click(function() { ...READ MORE

answered Apr 2, 2020 in Java-Script by Niroj
• 82,720 points
144 views
0 votes
1 answer

How to call jQuery UI Dialog with ASP.NET button postback?

Hello @kartik, To solve the problem with ASP:Button ...READ MORE

answered Apr 28, 2020 in Java-Script by Niroj
• 82,720 points
1,184 views
0 votes
1 answer

How to change url after success in ajax without page reload?

Hello @kartik, Use the browser history to change ...READ MORE

answered Apr 29, 2020 in Java-Script by Niroj
• 82,720 points
5,143 views
0 votes
1 answer

Why it is necessary to refresh CSRF token per form request?

Hello, Generating a new CSRF token for each ...READ MORE

answered Mar 19, 2020 in Laravel by Niroj
• 82,720 points
1,908 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,720 points
467 views
0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,720 points
179 views
0 votes
1 answer

How to retrieve or obtain data from the MySQL database using PHP?

Hello kartik,  Actually there are many functions that  ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,720 points
450 views
0 votes
1 answer

How to Determine if page is valid in JavaScript - ASP.NET?

Hello @kartik,  Make the call on an input ...READ MORE

answered Sep 9, 2020 in Java-Script by Niroj
• 82,720 points
384 views
0 votes
1 answer

How to validate an email address in JavaScript

Hello @kartik, To validate email use the below ...READ MORE

answered Jul 27, 2020 in Java-Script by Niroj
• 82,720 points
142 views