PC Review


Reply
Thread Tools Rate Thread

Getting Textbox data into an Array: VB 2008

 
 
vbStudent
Guest
Posts: n/a
 
      20th Oct 2008
Dear All,

I have textbox in my form .. I enter the student name in the text e.x
(vbstudent)

I want to sign textbox data to array, each letter in one index.

ex
array(0)=v
array(1)=b
array(2)=s
array(3)=t
array(4)=u
array(5)=d
array(6)=e
array(7)=n
array(8)=t

How can I do that .. please reply me soon.

Thanks for your cooperation

 
Reply With Quote
 
 
 
 
kimiraikkonen
Guest
Posts: n/a
 
      20th Oct 2008
On Oct 20, 3:10*am, vbStudent <vbStud...@discussions.microsoft.com>
wrote:
> Dear All,
>
> I have *textbox in my form .. I enter the student name in the text e.x
> (vbstudent)
>
> I want to sign textbox data to array, each letter in one index.
>
> ex
> array(0)=v
> array(1)=b
> array(2)=s
> array(3)=t
> array(4)=u
> array(5)=d
> array(6)=e
> array(7)=n
> array(8)=t
>
> How can I do that .. please reply me soon.
>
> Thanks for your cooperation


As it seems it's same as that thread:
http://groups.google.com/group/micro...a3cbed0?hl=en#

However, you can create a char array and assign the values of array
usin ToCharArray method as follows:

' Textbox1 is your textbox name
Dim arr() As Char = TextBox1.Text.ToCharArray

'Prove output is same as your example
For x As Integer = 0 To arr.Length - 1
MsgBox("array(" & x & ")=" & arr(x).ToString)
Next

Hope this helps,

Onur Güzel

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox to Array, Array Displayed in Textbox Derrick Candler Microsoft VB .NET 0 25th Sep 2011 10:08 AM
[2008] Clear contents of textbox, reverting transaction with textbox method undo Rob W Microsoft VB .NET 0 6th Mar 2009 11:39 AM
Getting Textbox data into an Array: VB 2008 GeekBoy Microsoft VB .NET 9 19th Oct 2008 07:06 AM
Create array of Textbox Dynamically and retrieve data from that textbox in asp .net Raju Microsoft C# .NET 1 8th Feb 2006 03:33 PM
Create array of Textbox Dynamically and retrieve data from that textbox in asp .net Raju Microsoft C# .NET 0 8th Feb 2006 07:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:35 PM.