[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Validation Summary

Posted on 2012-08-13
Medium Priority
Last Modified: 2012-08-14
I have inherited a page with the following tag (that works fine)
<asp:ValidationSummary ID="ValSummary" runat="server" CssClass="Error" HeaderText="Please correct these errors and try to submit again" />

However...I need to add some date validation logic in the vb page for expiration date and birth date validations

How do I fire off the summary if the vbcode requirements are not met as well?

The textbox getting filled is txtBirthDate
It has a compare validator cpvBirthDate linked to it. (ControlToValidate="txtBirthDate")
That keeps the formating correct
Question by:lrbrister
  • 2
  • 2
LVL 83

Expert Comment

ID: 38288224

Author Comment

ID: 38288291
Code Cruiser

So...should I set the Validator itself to fire with a different text label?

here's the issue.
The validator simply checks to see if it's in the right format.  08-01-2012

The vb code verifies it's a valid birth date.
NOT > now() and at least 18 years old.
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 38289991
You mean you are using a custom validator not a compare validator? If so, you have to set the e.valid property to false and validation summary will appear automatically. Otherwise, show your aspx code.

Author Closing Comment

ID: 38291602
As always. Thanks

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question