private void BindCity(Int64 UserIdno) { BindDropdownDAL obj = new BindDropdownDAL(); var FrmCity = obj.BindLocFromByUserId(UserIdno); ddlToCity.DataSource = FrmCity; ddlToCity.DataTextField = "City_Name"; ddlToCity.DataValueField = "City_Idno"; ddlToCity.DataBind(); ddlToCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0")); }
private void BindCity(Int64 UserIdno) { BindDropdownDAL obj = new BindDropdownDAL(); var FrmCity = obj.BindLocFromByUserId(UserIdno); obj = null; if (FrmCity.Count > 0) { ddlFromCity.DataSource = FrmCity; ddlFromCity.DataTextField = "City_Name"; ddlFromCity.DataValueField = "City_Idno"; ddlFromCity.DataBind(); } ddlFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Choose Location...", "0")); }