[2008] Sorting Textboxes and putting result in Alphabetical order
I have three textboxes and need the txb.Result show all three text boxes in alphabetical order. I have them going to the result box, but not in alphabetical order. Help!
Re: [2008] Sorting Textboxes and putting result in Alphabetical order
try this:
vb Code:
Dim textList As New List(Of String)
For x As Integer = 1 To 3
If Me.Controls("Textbox" & x.ToString).Text <> String.Empty Then
textList.Add(Me.Controls("Textbox" & x.ToString).Text)
End If
Next
textList.Sort()