I created a webpart, and I want to use the audience selector webpart.
I figured out that the PeopleEditor doesn't select my audiences, and there exist a separate control for this I think.
Is it possible to use this control in my webpart?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Web Parts in Microsoft SharePoint Server 2010 can be targeted to appear only to people who are members of a particular group or audience. When you do this by editing the Web Part in the browser, SharePoint Server 2010 assigns the GUID that identifies the audience to the AuthorizationFilter property of the Web Part. You can programmatically target a Web Part to an audience by performing the same operation in your code.
You can assign three kinds of audiences to the AuthorizationFilter property. To target a Web Part to a global audience programmatically, you can retrieve the GUID for the audience you want by using a AudienceManager object and then assigning that GUID to the AuthorizationFilter property of the Web Part.