private void BindState()
        {
            CityMastDAL obj = new CityMastDAL();
            var         lst = obj.SelectState();

            ddlState.DataSource     = lst;
            ddlState.DataTextField  = "State_Name";
            ddlState.DataValueField = "State_Idno";
            ddlState.DataBind();
            ddlState.Items.Insert(0, new ListItem("< Choose State >", "0"));
        }
Exemple #2
0
        /// <summary>
        /// To Bind State DropDown
        /// </summary>
        private void BindState()
        {
            CityMastDAL objclsCityMaster = new CityMastDAL();
            var         objCityMast      = objclsCityMaster.SelectState();

            objclsCityMaster        = null;
            drpState.DataSource     = objCityMast;
            drpState.DataTextField  = "State_Name";
            drpState.DataValueField = "State_Idno";
            drpState.DataBind();
            drpState.Items.Insert(0, new ListItem(" ----Select---- ", "0"));
        }