protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); // Databind list of roles in the role manager system to a listbox in the page AvailableRoles.DataSource = Roles.GetAllRoles(); AvailableRoles.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Databind list of roles in the role manager system to a listbox in the page AvailableRoles.DataSource = Roles.GetAllRoles(); AvailableRoles.DataBind(); this.UpdateSelectedRoles(); } }
// Activate event fires when the user hits "next" in the CreateUserWizard public void AssignUserToRoles_Activate(object sender, EventArgs e) { // Databind list of roles in the role manager system to a listbox in the wizard AvailableRoles.DataSource = Roles.GetAllRoles();; AvailableRoles.DataBind(); }