Tuesday, 16 October 2012




Binding drop down List from the database


          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