TKGhoul TKGhoul - 11 months ago 69 Question

Override String in TextBox

I have 3 text boxes on my form: Surname, First Name and Middle Name. I want to override my string. It looks like this:

...<<<<<<<<<<<<<<<<... (Length = 36)

If I save a value and the text boxes contain
Surname:Bergs, First Name:John Paul, Middle Name:Dale
, and for sample purpose I want to display this in
, and should be like this


I have 2 objectives in this Question.

  • How can I get the Text box specific value and display it on my string?

  • If Text Box Contains space how can I turn it into


I solved Second Problem fix using this

Dim str As String = "John Paul"
Dim str2 As String = str.Replace(" ", "<")

Answer Source

If i'm right, You can get textbox inputs to separate string variables and concatenate them into one string variable or you can get all textbox values to one string variables like

Dim AllStrings As String

AllStrings = MiddleTextBox.Text &" "& FirstTextBox.Text &" "& LastTextBox.Text

Then you can replace spaces by using Replace Method.

AllStings = AllStrings.Replace(" ","<")

Hope this will helpful to you.