H
headware
Lately, I've been using the CustomValidator control without the
ServerValidate event handler. For instance, if I'm importing a file and
there is an IOException thrown, I report back to the user that there
was a problem by setting the IsValid property of a CustomValidator to
false and returning.
The real reason I do it this way is so that the error message will be
displayed in the ValidationSummary control at the top of the page.
Handling the ServerValidate event of the CustomValidator doesn't really
make sense, because there's nothing to really validate, I just want to
display the message in the ValidationSummary.
I seem to be reading that this isn't a good idea. It appears to be
working fine, and I was wondering if there is a problem with doing this
that I'm not seeing.
Thanks,
Dave
ServerValidate event handler. For instance, if I'm importing a file and
there is an IOException thrown, I report back to the user that there
was a problem by setting the IsValid property of a CustomValidator to
false and returning.
The real reason I do it this way is so that the error message will be
displayed in the ValidationSummary control at the top of the page.
Handling the ServerValidate event of the CustomValidator doesn't really
make sense, because there's nothing to really validate, I just want to
display the message in the ValidationSummary.
I seem to be reading that this isn't a good idea. It appears to be
working fine, and I was wondering if there is a problem with doing this
that I'm not seeing.
Thanks,
Dave