Bhabani prasad Dash

Bhabani prasad Dash

  • NA
  • 244
  • 44.6k

dropdownlist data bind

May 22 2013 12:35 AM
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)