예제 #1
0
    private void LoadProvince()
    {
        Province        province = new Province();
        List <Province> provinces;

        ListItem item = new ListItem("-- Select a Province --", string.Empty, true);

        ddlProvince.Items.Add(item);

        provinces = province.GetAll();

        foreach (Province p in provinces)
        {
            item = new ListItem(p.Name, p.Id.ToString());
            ddlProvince.Items.Add(item);
        }

        ddlProvince.DataBind();
    }