I am trying to make an address from my model. The line contains line breaks, which I replace with the break tag. Although, this is turning the page as a string instead of HTML. How can I make my string display instead of HTML?
Attempt
<span id="addressLine"> @Model.MyData.Address.Replace("\r\n", "<br />"); </span>
Result on the page:
Address Top<br />Street Name<br />City<br />PostCode
Should display as:
Address Top Street Name City PostCode
source share