I have the following string value generated in the controller.
cc.lstchat = "Reply the Number with your question... <br />"; foreach (clsChat item in lstchat) { cc.lstchat =cc.lstchat + item.DisplayNumber+". " + item.ChatItem+" <br/> "; }
Now I am trying to display above a string value inside a div tag in my view, but it does not display line breaks.
<div id="divChat" style="width:400px;height:300px;border:double"> @Model.lstchat.ToString() </div>

chamara
source share