I have no idea why is that. Here is my code and it works perfectly when I try it on localhost but when I upload my website my text has no \'s. Why this
A lot has happened since IE6 (thank god!) so I would just like mention the CSS solution to the problem.
In your C#:
ViewBag.StringText = "some text" + Environment.NewLine + "more text in a new line";
In your CSS:
.newlines { white-space:pre-line; }
In your Razor:
@ViewBag.StringText