Tuesday, December 15, 2009

Disabling validation controls in asp.net

When using validation controls in ASP.NET pages, we might want to disable validation in certain situations. For example, if we don't want the validation controls to work in case of "cancel" or "log off", we can avoid validations in these cases.

The simplest method for this is to set the control's CausesValidation property to False. If done so, this control will no more cause the validators run.

asp:Button id="CancelButton" runat="server" Text="Cancel" CausesValidation="False" /)

No comments:

Post a Comment