In .NET converting a string with \n (new line) and other special characters to HTML and respecting the formatting?
in .NET, is there a way to convert a string with \n (new line) and other special characters to HTML respecting the formatting? If not I could write my own method to rep开发者_JAVA百科lace \n with < BR/>' put I wonder if there is a better way.
There is no better way, for example if you want to have a label's text take up two lines, you must manual add <br />
to the text of the label were you want the break to be.
精彩评论