Validation Summary - Adding Error Messages

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.
 

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

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top