Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > CustomValidator error doesl not show in ValidationSummary

Reply
Thread Tools

CustomValidator error doesl not show in ValidationSummary

 
 
Nir Erlich
Guest
Posts: n/a
 
      09-15-2003
Hi,

I have a custom validator on my web form among other validators, I am
trying to show all the error messages through a validation summary
control but the custom validation seem to always show its messages
separately.

Any way around it? much appreciates.
 
Reply With Quote
 
 
 
 
Michael Pearson
Guest
Posts: n/a
 
      09-15-2003
I think you need to set the Display to None for that Validator. Then it
will show in the summary.

Michael


"Nir Erlich" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> Hi,
>
> I have a custom validator on my web form among other validators, I am
> trying to show all the error messages through a validation summary
> control but the custom validation seem to always show its messages
> separately.
>
> Any way around it? much appreciates.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003


 
Reply With Quote
 
 
 
 
Nir Erlich
Guest
Posts: n/a
 
      09-16-2003
Thanks, I have already done so but it doesn't seem to make any difference.
 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      09-16-2003
Do you perhaps mean getting the error message in the alert box that is
displayed with ValidationSummary? And if that's the case, does your
CustomValidator do the validation only at server-side?

--
Teemu Keiski
MCP, Designer/Developer

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com


"Nir Erlich" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> Thanks, I have already done so but it doesn't seem to make any difference.



 
Reply With Quote
 
Nir Erlich
Guest
Posts: n/a
 
      09-17-2003
that's correct but in fact the only validation I have with the custom
validators is the client side. here is the code:

<asp:customvalidator id="Customvalidator1" Display="None"
ClientValidationFunction="ValidatepageData();" ErrorMessage="Please
choose a reason" Runat="Server"
NAME="Customvalidator1"></asp:customvalidator>
<asp:requiredfieldvalidator id="Requiredfieldvalidator1"
Display="None" ErrorMessage="Please enter a course name"
Runat="Server" NAME="Requiredfieldvalidator1"
ControlToValidate="txtCourseName"></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="Requiredfieldvalidator3"
Display="None" ErrorMessage="Please enter the course start date"
Runat="Server" NAME="Requiredfieldvalidator2"
ControlToValidate="txtStart"></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="Requiredfieldvalidator4"
Display="None" ErrorMessage="Please enter the course end date"
Runat="Server" NAME="Requiredfieldvalidator2"
ControlToValidate="txtEnd"></asp:requiredfieldvalidator>
<asp:customvalidator id="Customvalidator3" Display="None"
ClientValidationFunction="validDate();" ErrorMessage="Please enter a
valid date" Runat="Server"
NAME="Customvalidator3"></asp:customvalidator>
<asp:customvalidator id="Customvalidator2" Display="None"
ClientValidationFunction="checkDates();" ErrorMessage="Start date
can't be greater then end date" Runat="Server"
NAME="Customvalidator2"></asp:customvalidator>
<asp:requiredfieldvalidator id="Requiredfieldvalidator2"
Display="None" ErrorMessage="Please enter the course duration"
Runat="Server" NAME="Requiredfieldvalidator2"
ControlToValidate="txtCourseDuration"></asp:requiredfieldvalidator>
<asp:rangevalidator id="RangeValidator1" Display="None"
ErrorMessage="Please entere a valid duration value" Runat="server"
ControlToValidate="txtCourseDuration" MinimumValue="0"
MaximumValue="1000" Type="Integer"></asp:rangevalidator>
<asp:validationsummary id="Validationsummary1" Runat="Server"
NAME="Validationsummary1" DisplayMode="List" ShowSummary="False"
ShowMessageBox="True" HeaderText="Please check the
following:"></asp:validationsummary>

I'm thinking of going back to the good old way of validating values
with direct calls to js functions, it's getting a bit silly with all
these validators...
 
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
CustomValidator not adding error to ValidationSummary =?Utf-8?B?THVrZSBNb3JlaGVhZA==?= ASP .Net 1 08-22-2005 06:18 PM
ValidationSummary does not show message box when ShowMessageBox is true Blibo Baggins ASP .Net Web Controls 4 11-17-2004 05:59 PM
Show only the ValidationSummary dw ASP .Net 2 09-05-2004 11:36 PM
IMP:ValidationSummary/CustomValidator/ResetBtn SMG ASP .Net 1 07-26-2004 05:06 PM
validationSummary always show the HeaderText Mr. x ASP .Net Web Controls 0 12-12-2003 09:26 PM



Advertisments