Showing posts with label wrap the text in the DisplayFor in MVC view. Show all posts
Showing posts with label wrap the text in the DisplayFor in MVC view. 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