Line Break on strings in resource files RRS feed

  • Question

  • User-337759479 posted
    Hi friends, im using resource files to read localized strings to labels. I read on .Net documentation that i can insert Line Break´s into strings by using "\n" escape code. But this not work. I will apreciate some help on this subject. Thank you
    Thursday, February 12, 2004 11:15 AM

All replies

  • User-1000197047 posted
    It probably depends on where and maybe what language you are doing this in. The \n escape code is used in languages like C++, C# and Java as the newline char in strings. However it doesn't mean anything in VB. If the string is used in straight HTML like: <%= strMyText %> then it won't matter what language you were using for the aspx page, the \n will show up as \n and not a newline. In HTML you would need to use
    in place of \n. Now if the string is assigned to server controls through properties like Text then it could be the \n is converted to
    . - Eric McVicker
    Thursday, February 12, 2004 11:57 AM
  • User-731623299 posted
    You could also try using the Environment.NewLine statement, which inserts an environment-specific newline. It doesn't work for HTML though.
    Thursday, February 12, 2004 12:44 PM
  • User-1820406348 posted

     \n in .Net is  " & vbCrLf " 

    Wednesday, June 17, 2009 1:52 PM