1

I have two asp.net pages. both pages have many form controls including textarea control. on one page when user enter the data with enter key including the textarea post the enter key as '\r\n' and on other page enter key post as '\n'.

i don't understand why the behavior is different. on both pages.

Abdul Basit
  • 712
  • 2
  • 19
  • 37

1 Answers1

0

there are different meaning of both as below

\r = CR (Carriage Return) // Used as a new line character in Mac OS before X  
\n = LF (Line Feed) // Used as a new line character in Unix/Mac OS X
\r\n = CR + LF // Used as a new line character in Windows

You can visit this link
Difference between \n and \r?

Edit 1

IE returns "\r\n" to indicate newlines. FF returns "\n" in this case.
References What's with the line break variations in C# and ASP.NET? (\r\n vs.\n)

Community
  • 1
  • 1
शेखर
  • 17,412
  • 13
  • 61
  • 117