<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnetmafia.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx</link><description>I’ve been working with audiences again, so I recently wanted to set the target audience of a web part.&amp;#160; Sure anyone can set it in the UI, but I want to automate my deployment, so I wanted to do it programmatically using a feature receiver.&amp;#160;</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#3626</link><pubDate>Mon, 28 Jun 2010 22:10:53 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3626</guid><dc:creator>CoreyRoth</dc:creator><description>&lt;p&gt;@Sid To do a group, I believe you would change the format string to &amp;quot;;;;;{0}&amp;quot; where {0} would be the name of the SPGroup. &amp;nbsp;It might be the Id of the group instead, but I can't remember. &amp;nbsp;Try it out and confirm. &amp;nbsp;Let us know what you get. &amp;nbsp;Thanks.&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3626" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#3614</link><pubDate>Fri, 25 Jun 2010 08:52:53 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:3614</guid><dc:creator>Sid</dc:creator><description>&lt;p&gt;Hi Corey,&lt;/p&gt;
&lt;p&gt;Any ideas how to set SPGroup as target audience in the code in this post ???&lt;/p&gt;
&lt;p&gt;THanks,&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=3614" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#2886</link><pubDate>Tue, 02 Mar 2010 19:23:48 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:2886</guid><dc:creator>CoreyRoth</dc:creator><description>&lt;p&gt;I think it should, but you may need to put this code in the workflow itself.&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=2886" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#2885</link><pubDate>Tue, 02 Mar 2010 19:09:16 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:2885</guid><dc:creator>Andrew Tam</dc:creator><description>&lt;p&gt;Do you know if this will work when content deployment is being used? Example, I have an authoring environment where multiple contributors can manage their own content. Upon completion of an approval workflow the published content is deployed to a read-only environment. Thanks and nice work!&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=2885" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#1466</link><pubDate>Mon, 04 Jan 2010 20:35:02 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:1466</guid><dc:creator>CoreyRoth</dc:creator><description>&lt;p&gt;After looking around a bit, I am thinking that this will still be applicable. &amp;nbsp;The properties for audience targeting are showing up for me on my build. &amp;nbsp;You may have some other issue or you may need to set up profile synchronization.&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=1466" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#1463</link><pubDate>Mon, 04 Jan 2010 14:57:52 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:1463</guid><dc:creator>CoreyRoth</dc:creator><description>&lt;p&gt;That I will need to confirm. &amp;nbsp;I'll take a look at it sometime on my sp2010 image.&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=1463" width="1" height="1"&gt;</description></item><item><title>re: How to: Programmatically set the target audience on a web part</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/11/10/how-to-programmatically-set-the-target-audience-on-a-web-part.aspx#1462</link><pubDate>Mon, 04 Jan 2010 14:22:52 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:1462</guid><dc:creator>Hamza Farooq</dc:creator><description>&lt;p&gt;Is this applicable to SP 2010 ; I can easily enable the audience targeting but in web part i aint able to find properties to select the users. It used to be very simple and straight forward in MOSS 2007.&lt;/p&gt;
&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=1462" width="1" height="1"&gt;</description></item></channel></rss>