Reputation: 11
I have a Listbox in which items are collcted.
I want all items in listbox to be transferred into textbox by clicking a button.
And each item must be separated by character #
Thanks in advance.
Upvotes: 0
Views: 488
Reputation: 1309
string str1 = "";
foreach(var k in listBox1.Items)
{
str1 = str1 + " #" + k;
}
textBox1.Text = str1;
Upvotes: 2