Waqar Malik Waqar Malik - 8 months ago 78
ASP.NET (C#) Question

How to make validation summary show red text and make bullet point not show?

Just a quick question, I want to make the bullet point not show on my validation summary and also I want to make the text red. I was just wondering how to do this, please check my code below.

<div class="help-block col-md-12" style="list-style-type:none">


Change your call of ValidationSummary extension method like this:

@Html.ValidationSummary(true, "", new { @class = "custom-validation-summary" })

It will add the css class custom-validation-summary to the rendered html element which represents the summary, and than you can change the look with css:

.custom-validation-summary ul {
   color: red;
   padding: 0;

Here is simple MVC fiddle https://dotnetfiddle.net/wTZbmb