When I read in the data from SQL it has \r\n for the carriage returns, so I use .Replace to convert the \r\n’s to <br/>‘s but on display the <br/>‘s are ignored. It works if I replace the \r\n’s with <p></p> but this is not what I need.
The <br/>‘s are being ignored and I need them to produce a newline.
Any insight as to why it is doing this or how to achieve what I am looking to do would be great!
EDIT: I’ve addressed the typo in the code below – but that isn’t my question -at all-. I’ve asked about BR’s and them displaying.
HTML
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
CODE-BEHIND
string strTempDetail = myReader["Detail"].ToString();
string strMoreTempDetail = strTempDetail.Replace("\r\n", "<br/>");
LiteralControl UserControlSpecialOffers = new LiteralControl(strMoreTempDetail.ToString());
PlaceHolder1.Controls.Add(UserControlSpecialOffers);
Thanks!
Someone else had modified the css file and put BR display:none; in the CSS. Of all the places!