Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Displaying a Validation Error in a Validation Summary Control

Reply
Thread Tools

Displaying a Validation Error in a Validation Summary Control

 
 
Lucas Tam
Guest
Posts: n/a
 
      02-26-2004
Hi all,


I want to display an error message from a custom validator in my Validation
Summary control.

Do I need to build the ServerValidate Event handler in order to display an
error message?

All I wish to do is raise an error message on a failed database insert -
can I just set cvMyCustomValidator.IsValid = False?

Thanks.

--
Lucas Tam ()
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      02-26-2004
If validation summary is in MessageBox mode, it won't show the message
unless your custom validator works at client as well. At server side it is
the setting of IsValid=false as you noted but it works only if validation
summary has ShowSummary=True specified. Yes, it is specified in
ServerValidate event handler.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Lucas Tam" <> wrote in message
news:Xns949ADD0C2EC4Fnntprogerscom@140.99.99.130.. .
> Hi all,
>
>
> I want to display an error message from a custom validator in my

Validation
> Summary control.
>
> Do I need to build the ServerValidate Event handler in order to display an
> error message?
>
> All I wish to do is raise an error message on a failed database insert -
> can I just set cvMyCustomValidator.IsValid = False?
>
> Thanks.
>
> --
> Lucas Tam ()
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/



 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      02-26-2004
"Teemu Keiski" <> wrote in news:uRHUj#C$DHA.808
@TK2MSFTNGP12.phx.gbl:

> At server side it is
> the setting of IsValid=false as you noted but it works only if validation
> summary has ShowSummary=True specified. Yes, it is specified in
> ServerValidate event handler.
>


I can only seem to get my "dummy" validator to work if I have an event
hanlder in place.

Setting Isvalid=False alone doesn't seem to work...

Is there a way I can insert an error message into the ValidationSummary
without all the event handler code? (not much, but tedious). Thanks!

--
Lucas Tam ()
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding validation summary control in asp:MultiView control iHavAQuestion ASP .Net 0 04-28-2008 05:45 PM
Error With Bound Control Causes redirection to 404 Error page instead of displaying error Bishop ASP .Net 1 02-24-2007 09:42 PM
Validation Summary Message Box Not Displaying =?Utf-8?B?TWlrZSBNb29yZQ==?= ASP .Net 4 12-09-2004 05:09 AM
Using Summary Validation control with server Custom validation =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= ASP .Net 2 10-15-2004 06:15 PM
Validation Summary Control not displaying MessageBox Chris Lane ASP .Net Web Controls 11 11-24-2003 06:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57