Click here to Skip to main content
15,884,793 members
Please Sign up or sign in to vote.
2.80/5 (3 votes)
See more:
i have two button submit and cancel button. i want to call validation only when submit button is click not in cancel button click how i do this?
Plz Someone help me!
Posted

1 solution

Hi,
You can do it by setting CausesValidation="False" in your cancel button. like

ASP.NET
<asp:button runat="server" text="Submit" />
<asp:button runat="server" text="Cancel" causesvalidation="False" />

It will call validation for Submit button only not for cancel button.
 
Share this answer
 
v2
Comments
NABIN SEN 10-Mar-14 2:22am    
thank u so much santosh
SanSkun 10-Mar-14 2:48am    
Most welcome Sen

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