Binding drop down List from the database
DataSet ds = new DataSet();
sda.Fill(ds);
ddlDATE.DataSource = ds;
ddlDATE.DataTextField = "date";
ddlDATE.DataBind();
SqlCommand cmd = new SqlCommand("SELECT date FROM date", Class1.Getconnect());
SqlDataAdapter sda = new SqlDataAdapter(cmd);DataSet ds = new DataSet();
sda.Fill(ds);
ddlDATE.DataSource = ds;
ddlDATE.DataTextField = "date";
ddlDATE.DataBind();
No comments:
Post a Comment