More in this section

Forums / Developing with Sitefinity / Select MembershipProvider

Select MembershipProvider

2 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    18 Feb 2004
    04 Feb 2010
    Link to this post
    Hi all,

    The default modules of SF have a nice Permissions option available in their 'CommandPanels'.
    I created my own module and did used the 'PermissionView.ascx' from the Contacts Intra-Module example.

    Only in this example, there isn't an option to select a membership or role provider.

    Isn't it possible to use the default View of Sitefinity inside my own custom module for this?
    Or, how can I get this provider dropdownlist inside my own module?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    05 Feb 2010
    Link to this post
    Hi Daniel,

    You can try to integrate PermissionSet class in your custom view as it is done for the GenericContent based modules. You could also try to create a custom control that populates a DropDownList

    sample code

    if (Roles.Providers.Count > 1)
                            providers.AutoPostBack = true;
                            providers.SelectedIndexChanged += new EventHandler(providers_SelectedIndexChanged);
                            foreach (RoleProvider p in Roles.Providers)
                                ListItem item = new ListItem(p.Name);
                                if (p.Name.Equals(this.ProviderName, StringComparison.OrdinalIgnoreCase))
                                    item.Selected = true;
         void providers_SelectedIndexChanged(object sender, EventArgs e)
                this.ProviderName = ((ListControl)sender).SelectedValue;
                this.SelectedRole = null;
                this.ChildControlsCreated = false;

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
2 posts, 0 answered