cmd.CommandText = "select name from Tbl_Shahr_No";
SqlDataReader reader = null;
reader = cmd.ExecuteReader();
reader.Read();
while(reader.HasRows)
{
ddl.Items.add(reader["name"].tostring());
reader.read()
}
i wrote this code but problem is that while statement is true all times!
how can i read all of reader information with a while or repeater ring?
The simplest idea is to simply let
Read()be the loop condition.