I would like to wither add an additional CSS class or give an ID to my @Html.ValidationSummary()
tag. I tried the new
keyword like I would with other HTML Helpers but gives an anonymous type to string conversion error. Is this possible to do and if so how?
@Html.ValidationSummary(false, new { @id = "validationSummary" })
There is no method overload for Html.ValidationSummary that receives (Boolean, Object). There is one that receives (Boolean, String, Object) though.
You could try this:
@Html.ValidationSummary(false, "", new { @id = "validationSummary" })
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