Monday, July 13, 2009

Daily Tips- Tip #6 - How will you Disable Validation for ASP.NET Server Controls ?


On some pages you will allow users to post even if validations fail. By doing this setting you ask asp.net to by pass validations both at the client and server

For example to bypass validations use this skip button,
<asp:Button id="Button1" runat="server"
Text="Skip" CausesValidation="False">
</asp:Button>

To disable validation at server:

change the validation control's Enabled property to false.

To disable validation at client:

Change the validation control's EnableClientScript property to false.



www.codecollege.NET

No comments:

Post a Comment