コード例 #1
0
ファイル: AddCity.aspx.cs プロジェクト: rashityagi1101/dotnet
        public void clear()
        {
            txtCrCity.Text = "";
            ctlAdminMaster.ErrorMessage = "";
            dpStateCity.Items.Clear();

            ICityManager cityManager = (ICityManager)BusinessObjectManager.GetCityManager();
            List <State> stateList   = cityManager.GetStates();

            dpStateCity.Items.Add("None");
            foreach (State s in stateList)
            {
                ListItem item = new ListItem(s.Name, s.StateId.ToString());
                dpStateCity.Items.Add(item);
            }
            dpStateCity.DataBind();
        }