1

I have a webpart that works off audiences to target content to users in a global portla (content comes form all over) how can I give users the ability to see which audience they are currently in? For usability, I would like to add a link that shows the audiences the user currently belongs to so they can understand why they see what they see in the list.

In sharepoint 2010 BTW

0
AudienceLoader objAudLoader = AudienceLoader.GetAudienceLoader();
AudienceManager.IsCurrentUserInAudienceOf(objAudLoader, audience, false)

The AudienceLoader belongs to Microsoft.Office.Server.Audience namespace and documented here:

http://msdn.microsoft.com/en-us/library/microsoft.office.server.audience.audiencemanager.iscurrentuserinaudienceof.aspx

you also see this link: http://blogs.prexens.com/pages/category.aspx?Name=Audiences

Hops this helps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.