hi
i am taking one listbox in that listbox i add some items like ASP.Net, VB.Net, C#.Net, Sql Server. and i am taking one button and label.
when i click button listbox items are disolayed in label. how write code to do this.
Thanks.
Loading
Chellappan PandiarajanPosted Apr 12, 2010, 5:11 AM
Use this Coding in the Button Click Event....
then u will get what U Want....
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "";
listBox1.Sorted = true;
int i ;
for (i = 0; i < listBox1.Items.Count; i++)
label1.Text = label1.Text + listBox1.Items[i].ToString() + "\r\n";
}