Ever heard of Trim(). Use it!
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
Incorrect, trim does replace line breaks and spaces. Please prove me wrong but you won't.
I have just tested it:
Dim nl As String = System.Environment.NewLine
Dim test As String = " " + nl + nl + " TheText " + nl + nl
TextBox1.Text = test 'show original string in a multiline text box
TextBox2.Text = test.Trim 'show changed string in a multiline text box
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439