how to display only single message for multiple RequiredFieldValidator
instead of individual message for RequiredFieldValidator
?
i want to as shown in following image..
my view is..
You will have to use ValidationSummary
control for this. See this ValidationSummary Class MSDN article for details and example on how to do this. This article contains an example of what you are trying to figure out exactly.
set the HeaderText to something like "(*) Fields are required" to your validation summary.
you can leave error message field of each RequiredFieldValidator blank and put * in text field, then add ValidationSummary defining its header text with error msg this will works for your scenario.
<asp:RequiredFieldValidator ID="RequiredFieldValidator_overhead_name" runat="server" ControlToValidate="TextBox_overhead_name">*</asp:RequiredFieldValidator>
<asp:ValidationSummary ID="ValidationSummary_overhead_estimate" runat="server" DisplayMode="SingleParagraph" HeaderText="please insert data into fileds" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With