Loading ...

Prevent Validators from firing upon button clicks

 /5
0 (0votes)

Some junior programmers in my team were facing issues regarding ASP.NET validators. They wanted the validators NOT to fire on some button clicks on the same page. They did some google search and decided to use ValidationGroup for some reason.

I saw the code and told them to use CauseValidation property of the asp.net buttons. This property, if set to false, will disable the validators from firing upon the button click.

So one simply needs to use this property  as:

<asp:Button ID="btnCancelPopup" CausesValidation="false" runat="server" Text="Cancel" /></p>

Comments (1)

   
kantravi1985
Such a nice post vikek.
12/24/2008
 · 
by

Top Posts