Example #1
0
        protected void BindCountry()
        {
            //Create blank list
            List <RentALanguageTeacher.App_Code.Time.CountryDDL> list = new List <RentALanguageTeacher.App_Code.Time.CountryDDL>();

            //Fill list
            list = TimeService.FillCountryDDL();

            //Create Default Value
            RentALanguageTeacher.App_Code.Time.CountryDDL DefaultCountry = new RentALanguageTeacher.App_Code.Time.CountryDDL();

            DefaultCountry.CountryCode = "Default";
            DefaultCountry.CountryName = "Select your Country";

            list.Add(DefaultCountry);

            //Bind DDL
            Country.DataSource     = list;
            Country.DataValueField = "CountryCode";
            Country.DataTextField  = "CountryName";
            Country.DataBind();
            Country.SelectedValue = "Default";

            //Disable TimeZone
            TimeZone.Enabled = false;
        }
Example #2
0
        protected void BindNationality()
        {
            //Create blank list
            List <RentALanguageTeacher.App_Code.Time.CountryDDL> list = new List <RentALanguageTeacher.App_Code.Time.CountryDDL>();

            //Fill list
            list = TimeService.FillCountryDDL();

            //Create Default Value
            RentALanguageTeacher.App_Code.Time.CountryDDL DefaultCountry = new RentALanguageTeacher.App_Code.Time.CountryDDL();

            DefaultCountry.CountryCode = "Default";
            DefaultCountry.CountryName = "Select your Nationality";

            list.Add(DefaultCountry);

            //Bind DDL
            Nationality.DataSource     = list;
            Nationality.DataValueField = "CountryCode";
            Nationality.DataTextField  = "CountryName";
            Nationality.DataBind();
            Nationality.SelectedValue = "Default";
        }