L
Lucas Tam
Hi all,
I posted a message a couple minutes early and I'm not sure if it was too
clear.
I'm interested in adding custom messages to the validation control - is
there an easy way to do this?
Here is what I'm intending to do:
1. Have a form, validate all fields (done)
2. If Page is valid insert into database (done)
3. If there is a database error, display an error in the
ValidationSummary
I'm having trouble with #3. If I build a "database" custom validator on
the page, it seems I need to build the Customer Validator event handler
in order to make the error message display (the event handler in this
case return a false every time to trigger the error message). Not hard -
but why bother if there is ane easier method. I can't seem to find a way
to trigger an error (i.e. with just customvalidator.isvalid = false).
I need a simple way of adding error messages. Does anyone have any
suggestions?
Thanks.
I posted a message a couple minutes early and I'm not sure if it was too
clear.
I'm interested in adding custom messages to the validation control - is
there an easy way to do this?
Here is what I'm intending to do:
1. Have a form, validate all fields (done)
2. If Page is valid insert into database (done)
3. If there is a database error, display an error in the
ValidationSummary
I'm having trouble with #3. If I build a "database" custom validator on
the page, it seems I need to build the Customer Validator event handler
in order to make the error message display (the event handler in this
case return a false every time to trigger the error message). Not hard -
but why bother if there is ane easier method. I can't seem to find a way
to trigger an error (i.e. with just customvalidator.isvalid = false).
I need a simple way of adding error messages. Does anyone have any
suggestions?
Thanks.