Solved

validation summary control not getting displayed in asp.net

Posted on 2006-11-03
4
814 Views
Last Modified: 2008-07-03
hi experts,

I m doing one asp.net project in which i have two textbox fields for dates. I m comparing the start date & end date using compare validator.  I also have the Validation Summary control. But whatever error i m Getting the Validation Summary control is not getting displayed & messagebox as well.  What to do in this case?

And My other question is how to add the name of my project to the title bar of the messagebox?

thanx
0
Comment
Question by:s_monani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
badalpatel earned 500 total points
ID: 17872556
u can use the compare validaor as shown below..

<asp:CompareValidator id="valRequired" runat="server" ControlToValidate="textbox1"
    ValueToCompare="50" ' here u can give any other value
    Type="Integer"
    Operator="GreaterThan"
    ErrorMessage="* You must enter the a number greater than 50" Display="dynamic">*
</asp:CompareValidator>

<asp:ValidationSummary id="valSummary" runat="server"
    HeaderText="Errors:" 'in header text u can provide header...
    ShowSummary="true" DisplayMode="List" ShowMessageBox="True") />

The validation summary control will collect all the error messages of all the non-valid controls and put them in a tidy list. The list can be either shown on the web page (as shown in the example above) or with a popup box (by specifying ShowMessageBox="True")

Hope this will solve ur question
0
 
LVL 1

Author Comment

by:s_monani
ID: 17872723
hi,
Thanx for u r answer.  Actually all the things as same as u have specified. But i m not getting the messagebox as well as validation summary control is not getting displayed while error occured
 That's the prob.

Thanx
0
 
LVL 6

Expert Comment

by:badalpatel
ID: 17872750
can u give me ur code???
0
 
LVL 1

Author Comment

by:s_monani
ID: 17879017
thanx for u r reply sir.
The problem that i had added have been solved.  Now i have arised with one other question

I am displaying the validation summary messagebox, Now I don't want to display the contents of the Compare validator at run time.  Actullaly i made the forecolor of the contents to white, But whenever We select a page that contents Got Displayed. The other thing is if i make it invisible. Then it do not show the error in validation summary msgbox.

Can u plz help?

thanx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 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