I got the following code in my asp.net mvc VIEW.
<div class="row">
<div class="col-sm-12">
<span id="errorId" class="glyphicon glyphicon-remove" style="color: #FF0004;"></span> @Model.ErrorMessage
</div>
</div>
The @Model.ErrorMessage
may contain contain multiple strings but when the View is rendered, I don't see the line break. I tried adding <br />
and \r\n
but its all rendered on 1 line.
Here is a sample of the returning error message:
The first field is required.\r\nThe second field is required.\r\nThe third field is required.\r\n
I replaced the \r\n
with <br>
line tag but it still does not work.
how can I break the string up into separate lines? Thanks.
` tag, though that's falling out of favor. – mason Jan 27 '16 at 21:12