<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I.M.Possible &#187; SharePoint</title>
	<atom:link href="http://www.johanmk.com/tag/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johanmk.com</link>
	<description>What is impossible with men is possible with God</description>
	<lastBuildDate>Sun, 07 Mar 2010 04:16:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SharePoint Web Part Custom Properties</title>
		<link>http://www.johanmk.com/2010/01/19/sharepoint-web-part-custom-properties/</link>
		<comments>http://www.johanmk.com/2010/01/19/sharepoint-web-part-custom-properties/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 06:27:27 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Web Part]]></category>

		<guid isPermaLink="false">http://www.johanmk.com/?p=43</guid>
		<description><![CDATA[In my current project, I am creating a SharePoint web part that simply renders a custom .NET User Control from a certain location. I want the user to be able to configure the User Control's properties through the Web Part properties. Therefore I followed the MSDN instruction on how to create a web part with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.johanmk.com/_wp/wp-content/uploads/2010/01/wpcustomprop.jpg"><img class="alignright size-full wp-image-53" title="SharePoint Web Part Custom Properties" src="http://www.johanmk.com/_wp/wp-content/uploads/2010/01/wpcustomprop.jpg" alt="" width="238" height="171" /></a>In my current project, I am creating a SharePoint web part that simply renders a custom .NET User Control from a certain location. I want the user to be able to configure the User Control's properties through the Web Part properties. Therefore I followed the MSDN instruction on <a href="http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx" target="_blank">how to create a web part with custom properties</a>. However, somehow the custom properties just doesn't show up.</p>
<p>So, after scratching my head for a couple of hours (not literally), I found something that, <em>I think</em>, was not accurately specified:</p>
<ol>
<li><strong>Personalizable</strong> attribute needs to be specified</li>
<li>Use <strong>WebBrowsable</strong> instead of <strong>Browsable</strong> attribute</li>
</ol>
<p>This is the code-snippet that works for me:</p>
<pre class="brush: csharp;">
[Category(&quot;Custom Properties&quot;)]
[DefaultValue(true)]
[Personalizable(PersonalizationScope.Shared)]
[WebPartStorage(Storage.Shared)]
[FriendlyNameAttribute(&quot;Include lists&quot;)]
[WebBrowsable(true)]
[XmlElement(ElementName = &quot;IncludeLists&quot;)]
public bool IncludeLists { get; set; }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.johanmk.com/2010/01/19/sharepoint-web-part-custom-properties/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
