Click here to Skip to main content
15,867,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: Data Table Error Pin
Guffa9-Sep-05 13:38
Guffa9-Sep-05 13:38 
QuestionRe: HELP Pin
Expert Coming9-Sep-05 13:53
Expert Coming9-Sep-05 13:53 
AnswerRe: HELP Pin
Alomgir Miah9-Sep-05 14:35
Alomgir Miah9-Sep-05 14:35 
GeneralRe: HELP Pin
Expert Coming9-Sep-05 15:08
Expert Coming9-Sep-05 15:08 
QuestionEXCEL CHART HELP! Pin
dgap9-Sep-05 11:06
dgap9-Sep-05 11:06 
QuestionHours Minutes Seconds Pin
PHDENG819-Sep-05 10:58
PHDENG819-Sep-05 10:58 
AnswerRe: Hours Minutes Seconds Pin
Mohamad Al Husseiny9-Sep-05 14:47
Mohamad Al Husseiny9-Sep-05 14:47 
QuestionRemoving new lines from a string Pin
Luis Alonso Ramos9-Sep-05 10:56
Luis Alonso Ramos9-Sep-05 10:56 
Hello,

How can I remove all new lines from some text typed by the user in a multiline TextBox? He must enter some long text, so I want it wrapped in several lines, but if he presses Enter (or Ctrl+Enter), I want to remove the new line at the end.

I could go searching the string for all Environment.NewLine (or '\n' and '\r') but I would think there's a more efficient way.

Any ideas? Thanks!

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
AnswerRe: Removing new lines from a string Pin
Guffa9-Sep-05 11:22
Guffa9-Sep-05 11:22 
GeneralRe: Removing new lines from a string Pin
Luis Alonso Ramos9-Sep-05 14:13
Luis Alonso Ramos9-Sep-05 14:13 
AnswerRe: Removing new lines from a string Pin
Kujtim Hyseni9-Sep-05 12:54
Kujtim Hyseni9-Sep-05 12:54 
AnswerRe: Removing new lines from a string Pin
Kujtim Hyseni9-Sep-05 12:58
Kujtim Hyseni9-Sep-05 12:58 
QuestionWant to display text vertically? Pin
...---...9-Sep-05 10:54
...---...9-Sep-05 10:54 
AnswerRe: Want to display text vertically? Pin
Kujtim Hyseni9-Sep-05 12:48
Kujtim Hyseni9-Sep-05 12:48 
AnswerRe: Want to display text vertically? Pin
Kujtim Hyseni9-Sep-05 12:54
Kujtim Hyseni9-Sep-05 12:54 
AnswerRe: Want to display text vertically? Pin
Mohamad Al Husseiny9-Sep-05 14:11
Mohamad Al Husseiny9-Sep-05 14:11 
GeneralRe: Want to display text vertically? Pin
Anonymous9-Sep-05 16:39
Anonymous9-Sep-05 16:39 
Questiondate format (UK) Pin
pedros739-Sep-05 9:52
pedros739-Sep-05 9:52 
AnswerRe: date format (UK) Pin
Guffa9-Sep-05 11:38
Guffa9-Sep-05 11:38 
QuestionXML deserializer question Pin
Tom Wright9-Sep-05 9:47
Tom Wright9-Sep-05 9:47 
AnswerRe: XML deserializer question Pin
Judah Gabriel Himango9-Sep-05 10:24
sponsorJudah Gabriel Himango9-Sep-05 10:24 
General[Message Deleted] Pin
Tom Wright9-Sep-05 11:34
Tom Wright9-Sep-05 11:34 
GeneralRe: [Msg Deleted] Pin
Judah Gabriel Himango9-Sep-05 11:39
sponsorJudah Gabriel Himango9-Sep-05 11:39 
GeneralRe: [Msg Deleted] Pin
Tom Wright9-Sep-05 11:56
Tom Wright9-Sep-05 11:56 
GeneralRe: [Msg Deleted] Pin
Judah Gabriel Himango9-Sep-05 19:17
sponsorJudah Gabriel Himango9-Sep-05 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.