Validiation Control

H

Hai Nguyen

Name _______________ (requiredvalidiation)
Email _______________ (requiredvalidiation)
Address _______________ (requiredvalidiation)
Phone _______________ (requiredvalidiation)

PreviousButton NextButton ResetButton

I would like to know how I can disable the requiredvalidiation control when
i clicked PreviousButton which will take me back to the previous page, or
hit resetbutton which will reset every thing, nextbutton will do the
validiation

If I don't have requiredvalidiation control, everything works fine

Thanks
 
K

Ken Cox [Microsoft MVP]

You need to turn off validation for those buttons:

CausesValidation="False"


<asp:Button ID="CityQueryButton"
Text="Submit"
CausesValidation="False"
OnClick="SubmitButton_Click"
runat="server"/>

http://msdn.microsoft.com/library/d...bcontrolsbuttonclasscausesvalidationtopic.asp

"By default, page validation is performed when a Button control is clicked.
Page validation determines whether the input controls associated with a
validation control on the page all pass the validation rules specified by
the validation control.
You can specify or determine whether validation is performed on both the
client and the server when a Button control is clicked by using the
CausesValidation property. To prevent validation from being performed, set
the CausesValidation property to false."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,219
Latest member
Geraldine7

Latest Threads

Top