Click here to Skip to main content
15,041,525 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Run mode as follows

In Listbox as follows
Candidatename

Ashiwn
Baskar
Chandru
Das
Gopal


Listview (control)

i want to display the above Listbox items into Listview.

for that how can i do in asp.net using c#.
Regards,
Narasiman p.
Posted

I hope you problem is solved. try this code
C#
private void Form1_Load(object sender, EventArgs e)
        {
            listBox1.Items.Add("have a nice day");
            listBox1.Items.Add("nice day");
            listBox1.Items.Add("day");

        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
           
           
            foreach (object item in listBox1.Items)
	{
        string km = item.ToString();
        listView1.Items.Add(km);	 
	}
           
        }


for any query hit to reply.
Happy Coding ☺
jsb
   

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