I have some text, stored in a table. I'm using asp.net mvc to display this.
One of my views, has the following:
<%=(Model.QuestionBody.Replace("\r\n", "<br/>").Replace ("\r", "<br/>")) %>
Like this, it displays correctly However, if I omit the .Replace, it displays all on one line.
The same data displayed in a TextBox however, displays properly formatted.
My question is- Is there a better way of displaying the text in my View?