An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Hi @zal wel ,
Thanks for reaching out.
In ASP.NET Web Forms, each validation control can display its error message both inline (next to the input) and in the ValidationSummary.
If you want to suppress the inline messages and only show them in the ValidationSummary, you can set Display="None" on each validator.
For example:
<asp:RequiredFieldValidator
ID="NameTextBoxRequiredValidator"
runat="server"
ControlToValidate="NameTextBox"
ErrorMessage="Name field."
Display="None" />
<asp:RequiredFieldValidator
ID="CityTextBoxRequiredValidator"
runat="server"
ControlToValidate="CityTextBox"
ErrorMessage="City field."
Display="None" />
The ErrorMessage property is what gets picked up by the ValidationSummary. By setting Display="None", the validator will not render the message next to the textbox.
Your existing ValidationSummary can remain unchanged.
Alternatively, you can use the Text property for inline messages and keep ErrorMessage for the summary. However, if you want to completely suppress inline output, Display="None" is the simplest approach.
Hope this helps! If my answer was helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.