|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can cancel a validatorI am use a RequiredFieldValidator to valid a Text box, and there are two
Buttons on the forms, one for OK and one for Cancel, both are Asp.Net controls. When a user press Cancel to cancel the input, the RequiredFieldValidator also require user must enter the value. How can I do? If you're looking for a way to bypass validation when the cancel button
is clicked, take a look at the CausesValidation property on the System.Web.UI.WebControls.Button class. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsButtonClassCausesValidationTopic.asp Otherwise, you might be better off posting this question to the microsoft.public.dotnet.framework.aspnet news group. Set the CausesValidation property on the cancel button to false
HTH, Darren Kopp http://blog.secudocs.com/ |
|||||||||||||||||||||||