Hi guys, I have 2 buttons (submit,cancel) in my webform and 1 requiredfeildvalidator.

When i clickcancel, the requiredfieldvalidator activated, how do I deactivate it?????

Set the CauseValidation property of the Cancel button to false.

Update your Cancel button as follows:

<asp:Button id="Cancel" text="Cancel" CausesValidation="False" runat="server" />

Set the Cause Validation Property of cancel button to False ....Cool

thoughts on "RequiredFieldValidator"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>