how can we add data to a list box in asp.net using vb where the data is stored in database?

>how can we add data to a list box in asp.net using...

Method - 1

Use Items collection of ListBox.

ListBox1.Items.Add("Item1");

Method - 2

DataBinding.

ListBox1.DataSource = dataSource;
 ListBox1.DataTextField = "Col1";
 ListBox1.DataValueField  = "Col2";
 ListBox1.DataBind();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.