Solved

ASP.NET RequiredFieldValidator - Show required fields in summary

Posted on 2013-11-25
1
391 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 500 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Broken .resx file generating errors 18 43
Using sample Autorize.net c# simple example 1 53
history of pages 7 50
Issue in displaying table columns on selection of dropdown 2 27
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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