Click here to Skip to main content
15,917,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all

i have one textbox and one button
now i want How are prior to the word may differ of Before Coma OF Button Click

E.g the textbox value are 'Code,Project,Block'

Now I Click button then show textbox value are this type In any control

Code
Project
Block

Please help Me

thanks in advance
Posted
Updated 4-Jun-10 1:59am
v2

If I understand you, then try something like this

string[] words = textBox.Text.Split(',');
foreach(string word in words)
{
   listBox.Items.Add(word);
}
 
Share this answer
 
You should use the string.Split method:

http://msdn.microsoft.com/en-us/library/b873y76a.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900