Solved

ASP.NET RequiredFieldValidator - Show required fields in summary

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
imap mails 1 25
Expression Evaluater 3 37
asp.net mvc5 6 20
reading excel file in .net 2 15
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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