Thursday, March 6, 2008

adding new line characters...

When concatenating strings for say a incrementing message dialog, it is often necessary to add new lines characters. One way is to add
however this only works if you are displaying the results in html.

I believe that the following will show up as a new line in the code behind as well, however I still need to confirm this...

  • System.Environment.NewLine
example of use:
  • txtReason.Text + System.Environment.NewLine + System.Environment.NewLine + txtResolution.Text.Trim()
I have also heard of language specific representations of the /n character.

No comments: