Can anyone help me with a C# loop to populate an ASP:DropDownList. I am using the following code to bind the data to my dropdown. However, the first result doesn't populate in the drop down list. There should be 3 however, there is only 2 in the dropdown list.
Any help is great.
SqlDataReader dr;
dr = sqlcmd.ExecuteReader();
dropdown.DataSource = dr;
while (dr.Read())
{
dropdown.DataValueField = "ID";
dropdown.DataTextField = "Description";
dropdown.DataBind();
}