<?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>moopoo.net &#187; SharePoint</title>
	<atom:link href="http://moopoo.net/category/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://moopoo.net</link>
	<description>Fishing, technology and anything else</description>
	<lastBuildDate>Wed, 09 Jun 2010 11:34:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Required Field Validation Group on PeopleEditor control</title>
		<link>http://moopoo.net/sharepoint/required-field-validation-group-on-peopleeditor-control/</link>
		<comments>http://moopoo.net/sharepoint/required-field-validation-group-on-peopleeditor-control/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 11:34:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=125</guid>
		<description><![CDATA[Very similar to my post on validation of the DateTimeControl, a PeopleEditor (people picker) control I was using was validating on each postback.
I created a required field validator with a ValidationGroup and to get the validator to look at the correct people editor field use the following code.

myRequiredFieldValidator.ControlToValidate = string.Format&#40;&#34;{0}$downlevelTextBox&#34;, myPeopleEditor.ID&#41;;

]]></description>
			<content:encoded><![CDATA[<p>Very similar to my post on <a href="http://http://moopoo.net/sharepoint/validation-group-with-sharepoint-datetimecontrol/">validation of the DateTimeControl</a>, a PeopleEditor (people picker) control I was using was validating on each postback.<br />
I created a required field validator with a ValidationGroup and to get the validator to look at the correct people editor field use the following code.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">myRequiredFieldValidator.<span style="color: #0000FF;">ControlToValidate</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{0}$downlevelTextBox&quot;</span>, myPeopleEditor.<span style="color: #0000FF;">ID</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/required-field-validation-group-on-peopleeditor-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing element from web.config on feature de-activation</title>
		<link>http://moopoo.net/sharepoint/removing-element-from-web-config-on-feature-de-activation/</link>
		<comments>http://moopoo.net/sharepoint/removing-element-from-web-config-on-feature-de-activation/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 11:18:09 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=121</guid>
		<description><![CDATA[
public override void FeatureDeactivating&#40;SPFeatureReceiverProperties properties&#41; &#123;
&#160;
            SPSite site = &#40;SPSite&#41;properties.Feature.Parent;
&#160;
            SPWebConfigModification controlsSection = new SPWebConfigModification&#40;&#34;controls&#34;, &#34;configuration/system.web/pages&#34;&#41;;
            controlsSection.Owner = &#34;My.Menu&#34;;
    [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> FeatureDeactivating<span style="color: #000000;">&#40;</span>SPFeatureReceiverProperties properties<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
            SPSite site <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>SPSite<span style="color: #000000;">&#41;</span>properties.<span style="color: #0000FF;">Feature</span>.<span style="color: #0000FF;">Parent</span><span style="color: #008000;">;</span>
&nbsp;
            SPWebConfigModification controlsSection <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SPWebConfigModification<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;controls&quot;</span>, <span style="color: #666666;">&quot;configuration/system.web/pages&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Owner</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Sequence</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">20</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Type</span> <span style="color: #008000;">=</span> SPWebConfigModification.<span style="color: #0000FF;">SPWebConfigModificationType</span>.<span style="color: #0000FF;">EnsureSection</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&lt;controls&gt;&lt;/controls&gt;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            SPWebConfigModification addElement <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SPWebConfigModification<span style="color: #000000;">&#40;</span>
                <span style="color: #666666;">@&quot;add[@tagPrefix=&quot;</span><span style="color: #666666;">&quot;SharePoint&quot;</span><span style="color: #666666;">&quot;][@namespace=&quot;</span><span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #666666;">&quot;][@assembly=&quot;</span><span style="color: #666666;">&quot;My.Menu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd3368f0ff736bff&quot;</span><span style="color: #666666;">&quot;]&quot;</span>, 
                <span style="color: #666666;">&quot;configuration/system.web/pages/controls&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Owner</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Sequence</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">40</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Type</span> <span style="color: #008000;">=</span> SPWebConfigModification.<span style="color: #0000FF;">SPWebConfigModificationType</span>.<span style="color: #0000FF;">EnsureChildNode</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #666666;">@&quot;&lt;add tagPrefix=&quot;</span><span style="color: #666666;">&quot;SharePoint&quot;</span><span style="color: #666666;">&quot; namespace=&quot;</span><span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #666666;">&quot; assembly=&quot;</span><span style="color: #666666;">&quot;My.Menu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd3368f0ff736bff&quot;</span><span style="color: #666666;">&quot; /&gt;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebConfigModifications</span>.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span>controlsSection<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebConfigModifications</span>.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span>addElement<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebService</span>.<span style="color: #0000FF;">ApplyWebConfigModifications</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/removing-element-from-web-config-on-feature-de-activation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding element to web.config on feature activation</title>
		<link>http://moopoo.net/sharepoint/adding-element-to-web-config-on-feature-activation/</link>
		<comments>http://moopoo.net/sharepoint/adding-element-to-web-config-on-feature-activation/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 11:16:17 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=118</guid>
		<description><![CDATA[
public override void FeatureActivated&#40;SPFeatureReceiverProperties properties&#41; &#123;
&#160;
            SPSite site = &#40;SPSite&#41;properties.Feature.Parent;
&#160;
            SPWebConfigModification controlsSection = new SPWebConfigModification&#40;&#34;controls&#34;, &#34;configuration/system.web/pages&#34;&#41;;
            controlsSection.Owner = &#34;My.Menu&#34;;
    [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> FeatureActivated<span style="color: #000000;">&#40;</span>SPFeatureReceiverProperties properties<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
            SPSite site <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>SPSite<span style="color: #000000;">&#41;</span>properties.<span style="color: #0000FF;">Feature</span>.<span style="color: #0000FF;">Parent</span><span style="color: #008000;">;</span>
&nbsp;
            SPWebConfigModification controlsSection <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SPWebConfigModification<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;controls&quot;</span>, <span style="color: #666666;">&quot;configuration/system.web/pages&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Owner</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Sequence</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">20</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Type</span> <span style="color: #008000;">=</span> SPWebConfigModification.<span style="color: #0000FF;">SPWebConfigModificationType</span>.<span style="color: #0000FF;">EnsureSection</span><span style="color: #008000;">;</span>
            controlsSection.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&lt;controls&gt;&lt;/controls&gt;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            SPWebConfigModification addElement <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SPWebConfigModification<span style="color: #000000;">&#40;</span>
                <span style="color: #666666;">@&quot;add[@tagPrefix=&quot;</span><span style="color: #666666;">&quot;SharePoint&quot;</span><span style="color: #666666;">&quot;][@namespace=&quot;</span><span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #666666;">&quot;][@assembly=&quot;</span><span style="color: #666666;">&quot;My.Menu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd3368f0ff736bff&quot;</span><span style="color: #666666;">&quot;]&quot;</span>, 
                <span style="color: #666666;">&quot;configuration/system.web/pages/controls&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Owner</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Sequence</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">40</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Type</span> <span style="color: #008000;">=</span> SPWebConfigModification.<span style="color: #0000FF;">SPWebConfigModificationType</span>.<span style="color: #0000FF;">EnsureChildNode</span><span style="color: #008000;">;</span>
            addElement.<span style="color: #0000FF;">Value</span> <span style="color: #008000;">=</span> <span style="color: #666666;">@&quot;&lt;add tagPrefix=&quot;</span><span style="color: #666666;">&quot;SharePoint&quot;</span><span style="color: #666666;">&quot; namespace=&quot;</span><span style="color: #666666;">&quot;My.Menu&quot;</span><span style="color: #666666;">&quot; assembly=&quot;</span><span style="color: #666666;">&quot;My.Menu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd3368f0ff736bff&quot;</span><span style="color: #666666;">&quot; /&gt;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebConfigModifications</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>controlsSection<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebConfigModifications</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>addElement<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            site.<span style="color: #0000FF;">WebApplication</span>.<span style="color: #0000FF;">WebService</span>.<span style="color: #0000FF;">ApplyWebConfigModifications</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/adding-element-to-web-config-on-feature-activation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing custom application pages in _layouts directory</title>
		<link>http://moopoo.net/sharepoint/securing-custom-application-pages-in-_layouts-directory/</link>
		<comments>http://moopoo.net/sharepoint/securing-custom-application-pages-in-_layouts-directory/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 12:04:22 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=115</guid>
		<description><![CDATA[I had a need to be able to only allow site collection admins to see some custom pages I had deployed into the _layouts directory.
Create a custom code behind class for your aspx that inherits from LayoutsPageBase.
Next, override the OnLoad method in your code behind and add the following code

if &#40;!SPContext.Current.Web.UserIsSiteAdmin&#41;
     [...]]]></description>
			<content:encoded><![CDATA[<p>I had a need to be able to only allow site collection admins to see some custom pages I had deployed into the _layouts directory.<br />
Create a custom code behind class for your aspx that inherits from LayoutsPageBase.<br />
Next, override the OnLoad method in your code behind and add the following code</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008000;">!</span>SPContext.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UserIsSiteAdmin</span><span style="color: #000000;">&#41;</span>
              SPUtility.<span style="color: #0000FF;">HandleAccessDenied</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Exception<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;You need to be a site administrator to access this page.&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>This will redirect the user to the built in SharePoint Access denied page, for consistency.</p>
]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/securing-custom-application-pages-in-_layouts-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validation Group with SharePoint DateTimeControl</title>
		<link>http://moopoo.net/sharepoint/validation-group-with-sharepoint-datetimecontrol/</link>
		<comments>http://moopoo.net/sharepoint/validation-group-with-sharepoint-datetimecontrol/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:57:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Validation]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=109</guid>
		<description><![CDATA[The SharePoint DateTimeControl has a property called IsRequiredField, which will act like a RequiredFieldValidator for the control. The problem is when working with web parts in SharePoint calling Page.Validate in your web part can have unexpected results. It often ends up firing validators elsewhere on the page, particularly if the web part is used on [...]]]></description>
			<content:encoded><![CDATA[<p>The SharePoint DateTimeControl has a property called IsRequiredField, which will act like a RequiredFieldValidator for the control. The problem is when working with web parts in SharePoint calling Page.Validate in your web part can have unexpected results. It often ends up firing validators elsewhere on the page, particularly if the web part is used on a list form for example.<br />
One answer of course is to use a validation group in your web part, this is where the DateTimeControl falls down as it doesn&#8217;t have this property.</p>
<p>The answer to this to create a validator in your webpart and hook it into the TextBox element of the DateTimeControl, which will then allow you to set the validation group on it.</p>
<p>To do this use the following code when you create your validator.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">valReviewDate.<span style="color: #0000FF;">ControlToValidate</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{0}${0}Date&quot;</span>, dteReview.<span style="color: #0000FF;">ID</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p><a href="http://sharepointdata.blogspot.com/2009/06/sharepoint-datetime-control-validation.html">This post</a>, describes how to do it from code in front.</p>
]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/validation-group-with-sharepoint-datetimecontrol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Web Part button after clicking</title>
		<link>http://moopoo.net/sharepoint/disable-web-part-button/</link>
		<comments>http://moopoo.net/sharepoint/disable-web-part-button/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:24:40 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=104</guid>
		<description><![CDATA[Not sure how, I got to the end point of this so there may be other ways of doing it.
Basically I had a web part the when the button was clicked I needed to disable it.
Adding .Attributes["onclick"] didn&#8217;t seem to work, and after trying a few things I managed to get it working this way.
Add [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure how, I got to the end point of this so there may be other ways of doing it.<br />
Basically I had a web part the when the button was clicked I needed to disable it.<br />
Adding .Attributes["onclick"] didn&#8217;t seem to work, and after trying a few things I managed to get it working this way.<br />
Add the following code into OnPreRender of the web part, assuming cmdGenerate is the name of your button.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">cmdGenerate.<span style="color: #0000FF;">Attributes</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;onclick&quot;</span>, Page.<span style="color: #0000FF;">ClientScript</span>.<span style="color: #0000FF;">GetPostBackEventReference</span><span style="color: #000000;">&#40;</span>cmdGenerate, <span style="color: #666666;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;;this.value='Please wait...';this.disabled = true;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/disable-web-part-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Custom Masterpage in _layouts directory</title>
		<link>http://moopoo.net/mobile/using-custom-masterpage-in-_layouts-directory/</link>
		<comments>http://moopoo.net/mobile/using-custom-masterpage-in-_layouts-directory/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 10:19:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[masterpage]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=97</guid>
		<description><![CDATA[To use a custom or the default masterpage in custom aspx pages located in your _layouts directory use the following code in the code behind for the page.
N.B I didn&#8217;t declare any masterpage useage in the actual aspx file.

protected override void OnPreInit&#40;EventArgs e&#41;
&#123;
    base.OnPreInit&#40;e&#41;;
    // Set the masterpage to [...]]]></description>
			<content:encoded><![CDATA[<p>To use a custom or the default masterpage in custom aspx pages located in your _layouts directory use the following code in the code behind for the page.<br />
N.B I didn&#8217;t declare any masterpage useage in the actual aspx file.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> OnPreInit<span style="color: #000000;">&#40;</span>EventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">base</span>.<span style="color: #0000FF;">OnPreInit</span><span style="color: #000000;">&#40;</span>e<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008080; font-style: italic;">// Set the masterpage to the default.master.</span>
    <span style="color: #0600FF;">using</span> <span style="color: #000000;">&#40;</span>SPWeb webCurrent <span style="color: #008000;">=</span> SPControl.<span style="color: #0000FF;">GetContextSite</span><span style="color: #000000;">&#40;</span>Context<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">OpenWeb</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #FF0000;">string</span> strUrl <span style="color: #008000;">=</span> webCurrent.<span style="color: #0000FF;">ServerRelativeUrl</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;/_catalogs/masterpage/default.master&quot;</span><span style="color: #008000;">;</span>
        <span style="color: #008080; font-style: italic;">// custom.master is your same default or main master page </span>
        <span style="color: #008080; font-style: italic;">// being used for main portal pages. Change that path according to your need</span>
        <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">MasterPageFile</span> <span style="color: #008000;">=</span> strUrl<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span> 
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/mobile/using-custom-masterpage-in-_layouts-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CAML Querying using DateTime.</title>
		<link>http://moopoo.net/sharepoint/caml-querying-using-datetime/</link>
		<comments>http://moopoo.net/sharepoint/caml-querying-using-datetime/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 11:45:47 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CAML]]></category>

		<guid isPermaLink="false">http://moopoo.net/sharepoint/caml-querying-using-datetime/</guid>
		<description><![CDATA[Caml queries on DateTime fields by default do not use the Time portion of the field. To overcome this use the attribute IncludeTimeValue=’TRUE’ in the value tag. For example:
&#60;Value Type=’DateTime’ IncludeTimeValue=’TRUE’&#62;&#60;Today /&#62;&#60;/Value&#62;
]]></description>
			<content:encoded><![CDATA[<p>Caml queries on DateTime fields by default do not use the Time portion of the field. To overcome this use the attribute IncludeTimeValue=’TRUE’ in the value tag. For example:</p>
<p>&lt;Value Type=’DateTime’ IncludeTimeValue=’TRUE’&gt;&lt;Today /&gt;&lt;/Value&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/caml-querying-using-datetime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Web Part Properties</title>
		<link>http://moopoo.net/sharepoint/sharepoint-web-part-properties/</link>
		<comments>http://moopoo.net/sharepoint/sharepoint-web-part-properties/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:08:03 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=62</guid>
		<description><![CDATA[When creating a WebPart inheriting from System.Web.UI.WebControls.WebParts.WebPart, use the following code to add a custom Integer property that will sit in it&#8217;s own Category when you modify the properties of the web part.

private const int _intMaxShiftsPerDay = 0;
private int IntMaxShiftsPerDay = _intMaxShiftsPerDay;
&#91;Category&#40;&#34;Custom Properties&#34;&#41;&#93;
&#91;DefaultValue&#40;_intMaxShiftsPerDay&#41;&#93;
&#91;Personalizable&#40;PersonalizationScope.Shared&#41;&#93;
&#91;WebDisplayName&#40;&#34;Maximum Shifts Allowed Per Day&#34;&#41;&#93;
&#91;WebDescription&#40;&#34;Type in the maximum allowed shifts per day for [...]]]></description>
			<content:encoded><![CDATA[<p>When creating a WebPart inheriting from System.Web.UI.WebControls.WebParts.WebPart, use the following code to add a custom Integer property that will sit in it&#8217;s own Category when you modify the properties of the web part.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">int</span> _intMaxShiftsPerDay <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">private</span> <span style="color: #FF0000;">int</span> IntMaxShiftsPerDay <span style="color: #008000;">=</span> _intMaxShiftsPerDay<span style="color: #008000;">;</span>
<span style="color: #000000;">&#91;</span>Category<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Custom Properties&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>DefaultValue<span style="color: #000000;">&#40;</span>_intMaxShiftsPerDay<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>Personalizable<span style="color: #000000;">&#40;</span>PersonalizationScope.<span style="color: #0000FF;">Shared</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>WebDisplayName<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Maximum Shifts Allowed Per Day&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>WebDescription<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Type in the maximum allowed shifts per day for each person&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>WebBrowsable<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">&#91;</span>XmlElement<span style="color: #000000;">&#40;</span>ElementName <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;intMaxShiftsPerDay&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> intMaxShiftsPerDay
<span style="color: #000000;">&#123;</span>
    get
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">return</span> IntMaxShiftsPerDay<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
    set
   <span style="color: #000000;">&#123;</span>
        IntMaxShiftsPerDay <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/sharepoint-web-part-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy a sharepoint solution with stsadm</title>
		<link>http://moopoo.net/sharepoint/deploy-a-sharepoint-solution-with-stsadm/</link>
		<comments>http://moopoo.net/sharepoint/deploy-a-sharepoint-solution-with-stsadm/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 11:02:25 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://moopoo.net/?p=59</guid>
		<description><![CDATA[First off we need to add the solution to SharePoint    
 stsadm -o addsolution -filename c:\path-to\filename.wsp
Next, we deploy the solution to the site
stsadm -o deploysolution -name filename.wsp -url http://myurl -immediate Optionally if you use Code Access Security add the following to the above     
-allowcaspoliciesand if you have assemblies [...]]]></description>
			<content:encoded><![CDATA[<p>First off we need to add the solution to SharePoint    </p>
<p> <code>stsadm -o addsolution -filename c:\path-to\filename.wsp</code>
<p>Next, we deploy the solution to the site</p>
<p><code>stsadm -o deploysolution -name filename.wsp -url http://myurl -immediate </code>Optionally if you use Code Access Security add the following to the above     </p>
<p><code>-allowcaspolicies</code>and if you have assemblies that deploy to the GAC, add this line to the deploysolution statement above     </p>
<p><code>-allowgacdeployment</code>This will create a timer job, we then simply need to execute this job     </p>
<p><code>stsadm -o execadmsvcjobs</code></p>
]]></content:encoded>
			<wfw:commentRss>http://moopoo.net/sharepoint/deploy-a-sharepoint-solution-with-stsadm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
