Showing posts with label ASP .Net MVC wrap text in DisplayFor. Show all posts
Showing posts with label ASP .Net MVC wrap text in DisplayFor. Show all posts

Thursday, December 1, 2016

ASP .Net MVC wrap text in DisplayFor

If  the content displayed within a DisplayFor is too long you can wrap the text using following simple trick.

<div style="word-wrap:break-word;">
 @Html.DisplayFor(ModelItem => item.Text)
</div> 


cheers
Samitha