Reputation: 147
I am stuck on create multiline label in html and MVC3 also (using razor engine). Please give idea idea if you have. Thanks.
Upvotes: 0
Views: 4136
Reputation: 2333
You can use the Label MVC Helper method to render the label, and the white-space CSS property to make it multi-line:
<div style="white-space:pre-wrap">@Html.Label("", Model.MyMultiLineText)</div>
Upvotes: 0
Reputation: 147
I used the code below and resolve the problem:
word-wrap: break-word;
Upvotes: 1