Monday, February 15, 2010

.net form action with 2 button

In Asp.net, i have found difficulty to having 2 button when using
ASP.NET Validator Controls.
Finally i had found the solution and like to share.

CauseValidation="false" - this attribute must to set in button tag
which ignore the validation.

Example : Placing two button in a form namely 'submit' and 'clear'
where validate then send the event control the to submitting the form.
With the attribute CauseValidation="false" in clear button will
ignore the validation and allows to send the event control to function
for clear or reset the values of the form .

Note: By default CauseValidation="true" for all button available in
the asp.net form

Adobe News