SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=cmcdb;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("select userid from logins ", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
DropDownList1.Items.Add(dr["userid"].ToString());
}