I am loading a string from my database which among other things contains line breaks (\r\n). However, this isn’t being rendered as a new line but instead as \r\n.
If I type it directly in instead of loading it from a string, it works just fine but I need to be able to load it from a string.
Any ideas?
Edit: Upon closer inspection, it looks like the string is being returned as:
Changed test7\\r\\nChanged test8\\r\\nChanged test9Changed test7
From the database.
I tried running a .Replace(@"\\", @"\") on it but this had no effect at all. Any ideas?
This won’t work
.Replace("\\", "\")because it sees the backslash as an escape, but strangely, this doesn’t work when it should:.Replace(@"\\", @"\")The one that I got to work is this: