private void LoadData() { Groups grps = new Groups(); grps.LoadAll(); DropDownListGroups.DataSource = grps.DefaultView; DropDownListGroups.DataTextField = Groups.ColumnNames.GroupName.ToString(); DropDownListGroups.DataValueField = Groups.ColumnNames.GroupID.ToString(); DropDownListGroups.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Master.PageTitle = "Send Notifications Mails"; Groups grps = new Groups(); grps.LoadAll(); CheckBoxListGroups.DataSource = grps.DefaultView; CheckBoxListGroups.DataTextField = Groups.ColumnNames.GroupName; CheckBoxListGroups.DataValueField = Groups.ColumnNames.GroupID; CheckBoxListGroups.DataBind(); } }
private void loadGroups() { Groups grps = new Groups(); grps.LoadAll(); CheckBoxListGroups.DataSource = grps.DefaultView; CheckBoxListGroups.DataTextField = Groups.ColumnNames.GroupName.ToString(); CheckBoxListGroups.DataValueField = Groups.ColumnNames.GroupID.ToString(); CheckBoxListGroups.DataBind(); CheckBoxListGroups.Items.Insert(0, new ListItem("Public", "0")); }