Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using required field validator and ajax extender.
but when i am clicking the cancel button then also required field valdation fired.
i am using that valdations on ajax's tab control.
so cant navigate from that page.

i am beginner to ajax so plz anyone can help me out plz.
Posted
Updated 3-Mar-10 3:45am
v2

There is a property of the button, CausesValidation. Set it to false as:

<asp:Button ID="Button1" runat="server" Text="Button" CausesValidation="False"/>
 
Share this answer
 
Resolution 1:
Set the cancel button <code>CausesValidation</code> property to false

Resolution 2:
Use ValidationGroup attribute (of RequiredFieldValidator and all other controls you need to use for). Don't set this for cancel button.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900