J
Jonathan Wood
I'm new to ASP .NET and need help understanding validation.
I have a large VB .NET Web application that is working and I'd like to add
some validation to some additional fields. But I'm having the following
problems.
1. There is a continue button on the form and I set a breakpoint there.
However, if the form contains invalid data, the form is refreshed with
appropriate error messages and the Click event for the button does not get
called. (Note: several fields on the form have RequireFieldValidators
associated with them.) So how does the form know to even validate itself if
the code has not yet responded to the continue button being clicked?
2. I decided to try adding a new CustomValidator and associate it with
another control. I found that the ServerValidate event for the
CustomValidator does occur, but that setting args.IsValid = False seems to
have no effect.
3. 1. above seems to indicate that validation is being performed somehow on
the client side while my event handlers run on the server side. If this is
the case, then how can my CustomValidator event run in time to affect the
client-side validation?
Any help is appreciated!
I have a large VB .NET Web application that is working and I'd like to add
some validation to some additional fields. But I'm having the following
problems.
1. There is a continue button on the form and I set a breakpoint there.
However, if the form contains invalid data, the form is refreshed with
appropriate error messages and the Click event for the button does not get
called. (Note: several fields on the form have RequireFieldValidators
associated with them.) So how does the form know to even validate itself if
the code has not yet responded to the continue button being clicked?
2. I decided to try adding a new CustomValidator and associate it with
another control. I found that the ServerValidate event for the
CustomValidator does occur, but that setting args.IsValid = False seems to
have no effect.
3. 1. above seems to indicate that validation is being performed somehow on
the client side while my event handlers run on the server side. If this is
the case, then how can my CustomValidator event run in time to affect the
client-side validation?
Any help is appreciated!