Hi Smrng,
try to use like this!!
ddl.datasource = dt;
PostCode.DataTextField = "PostCode";
PostCode.DataValueField = "PostCode";
PostCode.DataBind();
otherwise use this
string qry1 = "select RoutNo from Tbl_Bus_RoutDetails";
da = new SqlDataAdapter(qry1, con);
da.Fill(ds, "Tbl_Bus_RoutDetails");
dt = ds.Tables["Tbl_Bus_RoutDetails"];
DropDownList1.Items.Clear();
foreach (DataRow Row in dt.Rows)
{
ListItem item1 = new ListItem();
item1.Value = Row[0].ToString();
DropDownList1.Items.Add(item1.Value);
}
DropDownList1.Items.Insert(0, new ListItem("Select", "Default value"));
da.Dispose();
regards
sarva