How to remove CR LF from a multiline text box

  • Thread starter Thread starter le_mo_mo
  • Start date Start date
L

le_mo_mo

Hi,

How do you remove the CRLF from a multiline textbox entry? Does anybody
have an example?

Thanks,
MO
 
Hi,

IMO a better solution is using Environment.NewLine instead of hardcoding
"\r\n"

cheers,
 
<"Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin AT
dot.state.fl.us> said:
IMO a better solution is using Environment.NewLine instead of hardcoding
"\r\n"

That partly depends on what other platforms use for the line separator
within textboxes. There's nothing to say it's the same as the natural
line separator for the platform. For instance, I don't know what Mono
uses as the line separator in its WinForms implementation - how sure
are you that it's "\n" instead of "\r\n"?
 
Hi,

You are right, even in a web environment the client may has a different
separator than the server.



cheers,
 
Back
Top