Connecting multiple text of the each textboxes
-
Tuesday, March 13, 2012 11:44 AM
Hi everyone, Could anybody help me please? I have firstname, middle initial and last name, with each have its own textboxes,
Now what I need is to combine the 3 of them for example I inputed this:
Jan
K.
David
the result would be
Jan k. David
So far this is my codes:
Dim whole As String
Dim first As String = Val(txtFirstname.Text)
Dim middle As String = Val(txtMiddlename.Text)
Dim last As String = Val(txtLastname.Text)
whole = first + " " + middle + " " + last
txtSample.Text = wholeThank you and Godbless..^^
All Replies
-
Tuesday, March 13, 2012 11:59 AM
You cannot use Val,because Val will turn string into numeric。
Solution:Just directly combine Text together——
Dim whole As String Dim first As String = txtFirstname.Text Dim middle As String = txtMiddlename.Text Dim last As String = txtLastname.Text whole = first + " " + middle + " " + last txtSample.Text = whole- Marked As Answer by GodspeedSupreme Tuesday, March 13, 2012 12:43 PM
-
Tuesday, March 13, 2012 12:44 PMOh... I see.. Thanks..^^ lesson learned:)
-
Wednesday, March 14, 2012 1:20 AM
Oh... I see.. Thanks..^^ lesson learned:)
Glad that your've solved your problem……



