Label replacement in MVC - linefeeds, carraige returns, <br /> replacements.
Posted on 2014-09-30
I have information from a number of different sources in my database which I would like to display to my user so what I did was I created a query to gather all the information.
To display the information, i did the following:
ViewData.Add("Details",fullname + "<br />" + partner + "<br />" + address + "<br />" + phone + "<br />" +
cell + "<br /><br /><a href='myhyperlinkpage.aspx?id=" + id + "'>Edit My Details</a>" );
But it is all formatted incorrectly in the page. The <br /> tags show up as text and my link shows up as <a href='myhyperlinkpage.aspx?id=2046d69cfa888888015797'>Edit My Details</a>
How should I be doing this?