private void BindCityDDL(Int64 intStateIdno) { BindDropdownDAL objClsBindDropDown = new BindDropdownDAL(); var lst = objClsBindDropDown.BindCity(intStateIdno); ddlCity.DataSource = lst; ddlCity.DataTextField = "City_Name"; ddlCity.DataValueField = "City_Idno"; ddlCity.DataBind(); ddlCity.Items.Insert(0, new ListItem(" ----Select----", "0")); }
private void BindCity(int stateIdno) { BindDropdownDAL obj = new BindDropdownDAL(); var FrmCity = obj.BindCity(stateIdno); ddlCity.DataSource = FrmCity; ddlCity.DataTextField = "City_Name"; ddlCity.DataValueField = "City_Idno"; ddlCity.DataBind(); obj = null; ddlCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0")); }
private void BindCity() { BindDropdownDAL BindDropdownDAL = new BindDropdownDAL(); var lst = BindDropdownDAL.BindCity(Convert.ToInt64(ddlState.SelectedValue)); BindDropdownDAL = null; ddlCity.DataSource = lst; ddlCity.DataTextField = "City_Name"; ddlCity.DataValueField = "City_Idno"; ddlCity.DataBind(); ddlCity.Items.Insert(0, new ListItem("< Choose City >", "0")); }