I'm trying to concatenate a string so that when I send it to my web form, it will become the text in a single label.
For some reason, all of the different types of line breaks that I try aren't working.
I've tried adding a \n
(including \r\n
) at each intended break location, as well as <br />
. With the \n
, it doesn't print \n
on the screen, it essentially ignores it, and with the <br />
, it just prints <br />
to the screen where I want the line breaks.
I also read to use Environment.NewLine
, but if that's even the solution to my problem, I'm not sure how to concatenate that onto the end of my string.
Please let me know of any other ideas or solutions you may have!
EDIT: Finally found an answer - Converting String to raw html
Have you tried
<br/>
? If you don't escape the '<' and '>' the renderer probably doesn't know they're not just plain text.