Reputation: 319
I have one form with four textbox and every textbox has requirefieldvalidator. One Button is for send the data to server. it has also event for onclientclick() and server side event onclick(). In client side function I have to ask whether you want further or not? by confirm(). Like
if (!confirm('Are you sure to Save?')) return false;
But When I press button than This message is show and when pressing ok it goes to server However textboxes are empty and validator gives error message also.
How I stop to go to server when validation is not proper. I have lookout in google that some API is available for validation on client side but I does not get well
Upvotes: 0
Views: 2544
Reputation: 50728
From the client-side, you can call Page_ClientValidate()
or Page_ClientValidate(group)
, and then check Page_IsValid
field. You can check this out for more information: http://msdn.microsoft.com/en-us/library/Aa479045
Upvotes: 5