I have a Listbox I am filling on the back end.
I need to add the (id from db) as the index.
How can I set the index of the Listbox item?
My Code:
DataTable dt = GetDataTable(sql);
foreach(DataRow row in dt.Rows)
{
lstCategory.Items.Add(row["code"].ToString() + "-" + row["description"].ToString());
}