Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Trying to add a list of SP users of a selected group.

$
0
0

I am wanting a css list I have already created to appear with the names of the members of whatever group was selected from the dropdown list. I have a dropdown list that is populated with all of our sp groups. they can choose one, and then after button click i want all the members of that group to appear in a list.

publicvoidButton8_Click(object sender,EventArgs e){stringgroup=DropDownList3.SelectedValue;SPWeb web =SPContext.Current.Web;
        groups = web.SiteGroups;SPGroup spGroup = web.SiteGroups[group];foreach(SPMember member in spGroup){
            myList.InnerHtml+="<li><a href='#'>"+ member +"</a></li>";}}



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>