?
Solved

ASP.NET RequiredFieldValidator - Show required fields in summary

Posted on 2013-11-25
1
Medium Priority
?
399 Views
Last Modified: 2013-11-26
I've used the '*' as the RequiredFieldValidator Error Message.  How do I display the name of the required fields in the summary?

  See the attachment.
I'm using Visual Studio 2005 and C#

label>PartNumber: </label>
                    <asp:TextBox ID="PartNumberTextBox" runat="server" Text='<%# Bind("PartNumber") %>' />                        
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="PartNumberTextBox"
                    runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
RequiredFields.png
0
Comment
Question by:cookiejar
[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
1 Comment
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 2000 total points
ID: 39676184
Use the errormessage property to specify the error message to be shown in the summary, use the text property to show the * by the field that is required :

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="PartNumberTextBox"
                    runat="server" ErrorMessage="Part Number is required" Text="*"></asp:RequiredFieldValidator>
0

Featured Post

Technology Partners: 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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

764 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