.Net's (C#) version of nl2br?

Just curious… what is ASP.NET’s (C#) equivalent to PHP’s nl2br (http://www.php.net/nl2br)?

Thanks,

Z

So we meet again, nl2br()!

This is something that really annoys me with PHP. Why in the nine hells are functions like this in the core class library? Anyway…

Do this in C#:

string strToFix = "this is line one\
This is line two";
strToFix = strToFix.Replace("\\r\
", "<br />\\r\
");

Ya, I remembered the .Replace after I posted this… but thanks! Ya, as a PHP programmer I came to rely on nl2br() quite often… heh. I do see your point though, I too wonder why it’s part of the core.

Thanks again.

Z