<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SharePoint Sharpener &#187; custom property</title>
	<atom:link href="http://sharepointsharpener.wordpress.com/tag/custom-property/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharepointsharpener.wordpress.com</link>
	<description>Obsessively Sharpening SharePoint</description>
	<lastBuildDate>Mon, 19 Oct 2009 21:48:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='sharepointsharpener.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a13c576c6a4d38c391bc0a6d1d7261ba?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>SharePoint Sharpener &#187; custom property</title>
		<link>http://sharepointsharpener.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sharepointsharpener.wordpress.com/osd.xml" title="SharePoint Sharpener" />
		<item>
		<title>Custom Properties in a SharePoint web part</title>
		<link>http://sharepointsharpener.wordpress.com/2008/08/04/custom-properties-in-a-sharepoint-web-part/</link>
		<comments>http://sharepointsharpener.wordpress.com/2008/08/04/custom-properties-in-a-sharepoint-web-part/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 13:21:22 +0000</pubDate>
		<dc:creator>Thomas Sondergaard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom properties]]></category>
		<category><![CDATA[custom property]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[tool pane]]></category>

		<guid isPermaLink="false">http://sharepointsharpener.wordpress.com/2008/08/04/custom-properties-in-a-sharepoint-web-part/</guid>
		<description><![CDATA[It&#8217;s simple, really. Whenever you install a web part, it probably needs a few settings to work properly.
Maybe the web part needs to know the name of a specific list to be able to gather information and display it to the user. Or perhaps it requires the email address of the person who should receive [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharepointsharpener.wordpress.com&blog=4068218&post=36&subd=sharepointsharpener&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s simple, really. Whenever you install a web part, it probably needs a few settings to work properly.</p>
<p>Maybe the web part needs to know the name of a specific list to be able to gather information and display it to the user. Or perhaps it requires the email address of the person who should receive status updates from the web part.</p>
<p>In any case you want the web part to be able to store simple textual and persistant information to be used in your code. You may of course decide to store this information in, say, a SQL Server table but &#8211; unless you need to store vast amounts of information &#8211; this is overkill and makes installation of the web part unecessarily difficult.</p>
<p>&nbsp;</p>
<p><strong>Custom web part properties to the rescue</strong></p>
<p>You can add your own properties to the tool pane which appears when you access the settings of a web part in the browser. You can even make your properties appear in its own section, like this:</p>
<p>&nbsp;<img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="144" alt="image" src="http://sharepointsharpener.files.wordpress.com/2008/08/image10.png?w=231&#038;h=144" width="231" border="0"> </p>
<p>&nbsp;</p>
<p>To achieve this, first add the following namespaces to your web part code:</p>
<p>&nbsp;<img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="57" alt="image" src="http://sharepointsharpener.files.wordpress.com/2008/08/image11.png?w=360&#038;h=57" width="360" border="0"> </p>
<p>&nbsp;</p>
<p>Then, for each property you need, insert a code block similar to this: </p>
<p>&nbsp;<img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="248" alt="image" src="http://sharepointsharpener.files.wordpress.com/2008/08/image12.png?w=579&#038;h=248" width="579" border="0"> </p>
<p>&nbsp;</p>
<p>Note that <em>Category</em>, <em>WebDisplayName</em> and<em> WebDescription</em> are optional but they do make your custom property much more readable for the end user.</p>
<p>In the above example, <em>propEmail</em> contains the default value of the property.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sharepointsharpener.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sharepointsharpener.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sharepointsharpener.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sharepointsharpener.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sharepointsharpener.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sharepointsharpener.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sharepointsharpener.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sharepointsharpener.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sharepointsharpener.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sharepointsharpener.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sharepointsharpener.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sharepointsharpener.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sharepointsharpener.wordpress.com&blog=4068218&post=36&subd=sharepointsharpener&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sharepointsharpener.wordpress.com/2008/08/04/custom-properties-in-a-sharepoint-web-part/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0dfb315d39c37443371df076767fa665?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thomassondergaard</media:title>
		</media:content>

		<media:content url="http://sharepointsharpener.files.wordpress.com/2008/08/image10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://sharepointsharpener.files.wordpress.com/2008/08/image11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://sharepointsharpener.files.wordpress.com/2008/08/image12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>