I have created method to store column value of Questions from Question table into array and now I wanted to display in a label one by one on button click event.
public ArrayList BindDataToArray()
{
ArrayList list = new ArrayList();
DataTable dt = new DataTable();
con = new SqlConnection(str);
cmd = new SqlCommand("select Question from Questions", con);
con.Open();
adp = new SqlDataAdapter(cmd);
adp.Fill(dt);
foreach (DataRow dtrow in dt.Rows)
{
list.Add(dtrow);
}
return list;
}