newlines in textboxes

  • Thread starter Thread starter headware
  • Start date Start date
H

headware

I have some multiline textboxes in a page and I'd like to turn the
newlines into spaces. I tried using something like this:

text = text.Replace(Environment.NewLine, " ");

but it wasn't finding the newlines. I had to do

text = text.Replace("\n", " ");

What's going on here?

Dave
 
My guess is Environment.NewLine is actually '\r\n' while the text sent by a
page is just '\n'..
 
Back
Top