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,520 points
3,669 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,840 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,840 points
2,194 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,840 points
1,105 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,840 points
3,635 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,840 points
4,563 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,840 points
3,269 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,840 points
1,301 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,840 points
3,365 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,840 points
2,785 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,840 points
1,151 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP