3
Answers

dropdownlist data bind

protected void DDLstate_SelectedIndexChanged(object sender, EventArgs e)
    {
        cmd = new SqlCommand("select City from Mst_City where State='"+DDLstate.SelectedValue+"'",con);
        da = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        da.Fill(ds, "Mst_City");
        DDLcity.DataSource = ds;
        DDLcity.DataBind();
        
    }
here in above code data retrived when am debugging but it will show system.data.datarowview in dropdownlist when am change in state from state dropdownlist
Answers (3)