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?
DaveMy guess is Environment.NewLine is actually '\r\n' while the text sent by a
page is just '\n'..
Girish Bharadwaj
http://msmvps.com/gbvb
"headware" <headware@.aol.com> wrote in message
news:e3f4b0ae.0409221023.51475a2@.posting.google.com...
> 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
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment