This is my current code
SqlConnection con = new SqlConnection("Data Source = .\\SQLEXPRESS; Initial Catalog = Library; Integrated Security = True");
string query = "select author_name from author";
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = query;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
{
}
ListItem is not being recognized.. How to do this?