By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

Concatonation and randon number generation

P: n/a
Hi

can someone tell me how i would concatonate two values obtained from 2 different textboxes

i.e what i want to do is. Concatonate the first letter of a persons firstname with the full surname and then concatonate this with a random number

Th2 firstname and surname are obtained from textboxes on my interface
this concatonation will have to be done on the onclick event of a submit button

I will then want to put the contents of this variable into a column of another datatable.

Thats my plan any way :o
Any help on this concatonation would be appreciated

thx
Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Take a look at this code (VB.NET)

Dim r As New Random
Dim rNumber As Integer = r.Next(1, 10)
Dim s As String = TextBox1.Text & TextBox2.Text & rNumber.ToString

If you need more info, please let us know!

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Angelina" <an*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
Hi,

can someone tell me how i would concatonate two values obtained from 2 different textboxes.
i.e what i want to do is. Concatonate the first letter of a persons firstname with the full surname and then concatonate this with a random
number.
Th2 firstname and surname are obtained from textboxes on my interface.
this concatonation will have to be done on the onclick event of a submit button.
I will then want to put the contents of this variable into a column of another datatable.
Thats my plan any way :o)
Any help on this concatonation would be appreciated.

thx

Nov 22 '05 #2

P: n/a
Take a look at this code (VB.NET)

Dim r As New Random
Dim rNumber As Integer = r.Next(1, 10)
Dim s As String = TextBox1.Text & TextBox2.Text & rNumber.ToString

If you need more info, please let us know!

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Angelina" <an*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
Hi,

can someone tell me how i would concatonate two values obtained from 2 different textboxes.
i.e what i want to do is. Concatonate the first letter of a persons firstname with the full surname and then concatonate this with a random
number.
Th2 firstname and surname are obtained from textboxes on my interface.
this concatonation will have to be done on the onclick event of a submit button.
I will then want to put the contents of this variable into a column of another datatable.
Thats my plan any way :o)
Any help on this concatonation would be appreciated.

thx

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.