<?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>My Insights &#187; Sharepoint 2007 ( MOSS / WSS )</title>
	<atom:link href="http://www.pranavsharma.com/blog/category/sharepoint-2007-moss-wss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pranavsharma.com/blog</link>
	<description>A fresh perspective on the world of technology</description>
	<lastBuildDate>Fri, 16 Dec 2011 06:16:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Rendering User Control ASCX via XSL in SharePoint</title>
		<link>http://www.pranavsharma.com/blog/2011/08/12/rendering-user-control-ascx-via-xsl-in-sharepoint/</link>
		<comments>http://www.pranavsharma.com/blog/2011/08/12/rendering-user-control-ascx-via-xsl-in-sharepoint/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 17:19:50 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Sharepoint 2010 (SPS / Foundation)]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[ASCX]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[User Control]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2011/08/12/rendering-user-control-ascx-via-xsl-in-sharepoint/</guid>
		<description><![CDATA[Background &#38; The Problem <p>Last time we discussed <a href="http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/">how to integrate a custom control into an XSL transformation</a>. The key point to note about the previously discussed approach is that all the markup is output by the overridden Render method. This can easily get cumbersome and ineffective for complex server side controls. The ASP.net [...]]]></description>
			<content:encoded><![CDATA[<h2>Background &amp; The Problem</h2>
<p>Last time we discussed <a href="http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/">how to integrate a custom control into an XSL transformation</a>. The key point to note about the previously discussed approach is that all the markup is output by the overridden Render method. This can easily get cumbersome and ineffective for complex server side controls. The ASP.net stack offers us a solution to this common problem with Control definitions. This solution is a UserControl which adds a special ASCX file containing declarative markup which makes the development task much easier, simpler &amp; cleaner. </p>
<p>In this post, we will show how to incorporate a server side UserControl with markup in it’s ASCX file to render within an XSLT instead of a simple Control definition.</p>
<h2>How to do this</h2>
<p>In order to render a UserControl ASCX within an XSLT, we need to follow a slightly different method that the one discussed in the previous post. Here are the steps-</p>
<ol>
<li>First thing we need to do is to define our user control. Here is a sample ASCX definition. Notice that this control renders a variable called ‘Input’ which we will also define in the code-behind class in the next step-      <br /> <br />
<blockquote>
<pre class="csharpcode"><span class="asp">&lt;%@ Assembly Name=&quot;$SharePoint.Project.AssemblyFullName$&quot; %&gt;</span>
<span class="asp">&lt;%@ Assembly Name=&quot;Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; %&gt;</span>
<span class="asp">&lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;DemoControl.ascx.cs&quot; Inherits=&quot;Demo.ControlTemplates.DemoControl&quot; %&gt;</span>

<span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>(<span class="asp">&lt;%</span>= Input <span class="asp">%&gt;</span>)<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</li>
<li>Next, we define the code-behind that our ASCX inherits from. Notice that we are declaring a public string property called ‘Input’ whose value is being directly rendered within the ASCX as an example. This variable is used to accept contextual information about the XML node being processed by the XSL transform at the time of evaluating this control during the runtime-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">using</span> System.Web.UI;

<span class="kwrd">namespace</span> Demo.ControlTemplates
{
    <span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> DemoControl : UserControl
    {
        <span class="kwrd">public</span> <span class="kwrd">string</span> Input;
    }
}</pre>
</blockquote>
<ol><!--EndFragment--></ol>
</li>
<li>Next, we need to globally register our user control so that our XSLT can find it. This is done because we don’t have the ability to register custom user controls from within an XSLT webpart. The following registration happens in the web.config in this node: &lt;configuration&gt;…&lt;system.web&gt;…&lt;pages&gt;…&lt;controls&gt;. Notice that we assign a tagName for this user control. This tag name will be used when we reference the user control in our XSLT-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">tagPrefix</span><span class="kwrd">=&quot;PSControl&quot;</span> <span class="attr">src</span><span class="kwrd">=&quot;/_controltemplates/demo/democontrol.ascx&quot;</span> <span class="attr">tagName</span><span class="kwrd">=&quot;PSC&quot;</span><span class="kwrd">/&gt;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</li>
<li>Now that SharePoint globally knows about this user control, we need to modify our xsl declaration to assign a tag prefix for this control so that we can reference it wherever we want to use it. In this case, our tag prefix is ‘PSControl’-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">xsl:stylesheet</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">xmlns:xsl</span><span class="kwrd">=&quot;http://www.w3.org/1999/XSL/Transform&quot;</span> <span class="attr">xmlns:PSControl</span><span class="kwrd">=&quot;Demo.ControlTemplates&quot;</span> <span class="kwrd">&gt;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</li>
<li>Now that everything has been setup, we can simply reference our custom user control using the tag prefix defined in step 4 (PSControl) and the tag name defined in step 3 (PSC). Combined this tag declaration allows us to render our custom user control ASCX which was written declaratively to save development time associated with defining a custom server side control for our XSLT. Notice that we are using the Input property defined in the UserControl and passing it contextual value about the current node&#160; being processed in this case-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">PSControl:PSC</span> <span class="attr">Input</span><span class="kwrd">=&quot;{title}&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="kwrd">/&gt;</span></pre>
</blockquote>
</li>
</ol>
<p>That’s it! You can now write declarative markup in a UserControl ASCX file and have that markup process XML nodes using a code-behind, all within the context of an XSL transform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2011/08/12/rendering-user-control-ascx-via-xsl-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Controls in XSLT</title>
		<link>http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/</link>
		<comments>http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 19:04:31 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Sharepoint 2010 (SPS / Foundation)]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[ddwrt]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/</guid>
		<description><![CDATA[Background &#38; The Dream <p>SharePoint relies heavily on XML data and XSLT processing of such data. Whether we are dealing with Search results, Data view web parts or Content Query web parts, XSLT processing is something all SharePoint developers have to deal with on regular basis. SharePoint provides an XSLT extension object called ddwrt to [...]]]></description>
			<content:encoded><![CDATA[<h2>Background &amp; The Dream</h2>
<p>SharePoint relies heavily on XML data and XSLT processing of such data. Whether we are dealing with Search results, Data view web parts or Content Query web parts, XSLT processing is something all SharePoint developers have to deal with on regular basis. SharePoint provides an XSLT extension object called ddwrt to perform tasks such as accessing properties of a SharePoint list or firing events to connected Web Parts.</p>
<p>Even though XSL transforms are incredibly powerful, especially with the availability of extension objects like ddwrt, sometimes it is much quicker and easier to perform advanced processing using server side controls. In other cases, it’s almost a necessity. Imagine being able to take xml data and query external web services during the transformation process to render customized contextual information about the data being displayed to the user. </p>
<p>For example, let’s say we were to implement a staff directory using SharePoint people search. The underlying data is stored in the User Profile service application and the results are rendered using the people core results web part. However what if instead of simply displaying a list of people, we additionally wanted to display a list of projects that they are participating in? In this case, imagine the power of being able to insert a server side control in the XSLT to query a 3rd party project management system to retrieve the list of a particular user’s projects and then rendering that nested within the rest of the XSL transform</p>
<h2>How to do it</h2>
<p>There are 4 steps needed in order to be able to insert server side controls within a SharePoint XSLT-</p>
<ol>
<li>First thing we need to do is to write the control that we will be inserting into our XSLT. Notice that we are declaring two public properties called ‘itemUrl’ and ‘print’. These properties are used to pass xml data at run-time into our control. We are also overriding the Render method which is used to spit out the code that will be output to the end user-</li>
<blockquote><pre class="csharpcode"><span class="kwrd">namespace</span> PortalSolutions.WebUI.Controls
{
    <span class="kwrd">public</span> <span class="kwrd">class</span> SampleFields : Control
    {
        <span class="kwrd">public</span> <span class="kwrd">string</span> itemUrl;
        <span class="kwrd">public</span> <span class="kwrd">string</span> print;

        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Render(HtmlTextWriter writer)
        {
            writer.Write(<span class="str">&quot;&lt;div&gt;Hello World&lt;/div&gt;&quot;</span>);
        }
    }
}</pre>
</blockquote>
<li>The next thing for us to accomplish is to globally register our assembly and a tagPrefix for this assembly so that SharePoint can find our control. This is done because we don’t have access to register our assembly from within the XSL editor on SharePoint web parts. This registration is added in the web.config under the following node:&#160; &lt;configuration&gt;…&lt;system.web&gt;…&lt;pages&gt;…&lt;controls&gt;-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">tagPrefix</span><span class="kwrd">=&quot;PS&quot;</span> <span class="attr">namespace</span><span class="kwrd">=&quot;PortalSolutions.WebUI.Controls&quot;</span> <span class="attr">assembly</span><span class="kwrd">=&quot;PortalSolutions.WebUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=00aaa666444222cc&quot;</span> <span class="kwrd">/&gt;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</li>
<li>Now that SharePoint knows about our assembly and can find the control, we have add a declaration on top of XSL to attach a prefix to our namespace so that we can reference our control. In this case, ‘PS’ is the tag prefix we will be using-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">xsl:stylesheet</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">xmlns:xsl</span><span class="kwrd">=&quot;http://www.w3.org/1999/XSL/Transform&quot;</span> <span class="attr">xmlns:PS</span><span class="kwrd">=&quot;PortalSolutions.WebUI.Controls&quot;</span> <span class="kwrd">&gt;</span></pre>
</blockquote>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</li>
<li>Finally, now that we have everything set, we simply have to reference our control where we want to render it by using our tag prefix we registered in step 3 and the name of our control class which in this case is ‘SampleFields’. Additionally we use the public properties declared in the control definition as attributes in our XSL to pass in any information that the control may need to process the current XML node-<br />
    </p>
<blockquote>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">PS:SampleFields</span> <span class="attr">itemUrl</span><span class="kwrd">=&quot;{$url}&quot;</span> <span class="attr">print</span><span class="kwrd">=&quot;HelloWorld&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="kwrd">/&gt;</span></pre>
</blockquote>
</li>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</ol>
<p>And there we have it! A custom server side control puts a lot of power in the hands of developers looking to deliver some really powerful and amazing solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2011/06/08/custom-user-controls-in-xslt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Missing User Profile values after migration</title>
		<link>http://www.pranavsharma.com/blog/2011/04/14/missing-user-profile-values-after-migration/</link>
		<comments>http://www.pranavsharma.com/blog/2011/04/14/missing-user-profile-values-after-migration/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 15:08:41 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Sharepoint 2010 (SPS / Foundation)]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[User Profile]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2011/04/14/missing-user-profile-values-after-migration/</guid>
		<description><![CDATA[Problem <p>Are you missing user profile values for certain fields after a migration of the SSP database to SharePoint 2010 User Profile Service Application? If you look closely, the properties that are missing are managed metadata properties and this is a common oversight during a migration. </p> Solution <p>Run the “Move-SPProfileManagedMetadataProperty” commandlet on each of [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>Are you missing user profile values for certain fields after a migration of the SSP database to SharePoint 2010 User Profile Service Application? If you look closely, the properties that are missing are managed metadata properties and this is a common oversight during a migration. </p>
<h2>Solution</h2>
<p>Run the “Move-SPProfileManagedMetadataProperty” commandlet on each of the missing properties-</p>
<blockquote><p>Move-SPProfileManagedMetadataProperty      <br />-ProfileServiceApplicationProxy ee475d63-fa17-4439-ac5c-656c164a86c3 -Identity SPS-Skills -AvailableForTagging       <br />-TermSetName myTermSet</p>
</blockquote>
<ol>
<li>SPS-School </li>
<li>LanguagesSpoken </li>
<li>Areasofexpertise </li>
<li>Areasofstudy </li>
<li>Degrees </li>
<li>SPS-Responsibility </li>
<li>SPS-Skills </li>
<li>SPS-PastProjects </li>
<li>AreasofInterest </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2011/04/14/missing-user-profile-values-after-migration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Search Results Hidden Object</title>
		<link>http://www.pranavsharma.com/blog/2011/04/13/search-results-hidden-object/</link>
		<comments>http://www.pranavsharma.com/blog/2011/04/13/search-results-hidden-object/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 01:54:50 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Sharepoint 2010 (SPS / Foundation)]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WSS]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2011/04/13/search-results-hidden-object/</guid>
		<description><![CDATA[<p>SharePoint search webparts leverage an internal private class called SearchResultsHiddenObject which does a lot of heavy lifting around query execution. This object is also responsible for ‘connecting’ results between webparts such as the Paging, Core Results and Search Actions webparts. Now what if you want to do a custom keyword query or perhaps even a [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint search webparts leverage an internal private class called SearchResultsHiddenObject which does a lot of heavy lifting around query execution. This object is also responsible for ‘connecting’ results between webparts such as the Paging, Core Results and Search Actions webparts. Now what if you want to do a custom keyword query or perhaps even a full text query? </p>
<p>The typical answer is to write a custom core results webpart, but what about the other related webparts? You could in theory write a new paging webpart and a new search actions webpart and so on but wouldn’t it be nice if all these related webparts just worked with your new core results webpart? The answer is that they can but you have to get a little creative about modifying the SearchResultsHiddenObject. Here is an example where we disable duplicate trimming for correct paging behavior-</p>
<pre class="csharpcode"><span class="kwrd">object</span> srho = HttpContext.Current.Items[<span class="str">&quot;OSSSRHDC_0&quot;</span>];
<span class="kwrd">if</span> (srho != <span class="kwrd">null</span>)
{
    Type srhoType = srho.GetType();
    FieldInfo startAt = srhoType.GetField(<span class="str">&quot;_DuplicatesRemoved&quot;</span>, BindingFlags.Instance | BindingFlags.NonPublic);
    startAt.SetValue(srho, <span class="kwrd">false</span>);
}</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Here is a great walkthrough by Corey Roth on this topic: <a title="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/06/09/new-web-part-for-wildcard-search-in-enterprise-search.aspx" href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/06/09/new-web-part-for-wildcard-search-in-enterprise-search.aspx">http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/06/09/new-web-part-for-wildcard-search-in-enterprise-search.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2011/04/13/search-results-hidden-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STP uploaded by feature doesn&#8217;t appear on create page</title>
		<link>http://www.pranavsharma.com/blog/2010/05/06/stp-uploaded-by-feature-doesnt-appear-on-create-page/</link>
		<comments>http://www.pranavsharma.com/blog/2010/05/06/stp-uploaded-by-feature-doesnt-appear-on-create-page/#comments</comments>
		<pubDate>Thu, 06 May 2010 19:50:01 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Create.aspx]]></category>
		<category><![CDATA[Feature]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[List Template Gallery]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[Property]]></category>
		<category><![CDATA[STP]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2010/05/06/stp-uploaded-by-feature-doesnt-appear-on-create-page/</guid>
		<description><![CDATA[<p>Problem <br />STP list templates uploaded using a feature are not available to instantiate on create.aspx</p> <p>Solution <br />When you upload a list template (STP) using a feature to the list template gallery ( _catalogs/lt ), you must set some attributes in order for the template to show up on the create.aspx page-</p> &#60;Elements xmlns=&#34;http://schemas.microsoft.com/sharepoint/&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem     <br /></strong>STP list templates uploaded using a feature are not available to instantiate on create.aspx</p>
<p><strong>Solution</strong>    <br />When you upload a list template (STP) using a feature to the list template gallery ( _catalogs/lt ), you must set some attributes in order for the template to show up on the create.aspx page-</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">Elements</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://schemas.microsoft.com/sharepoint/&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">Module</span> <span class="attr">Url</span><span class="kwrd">=&quot;_catalogs/lt&quot;</span> <span class="attr">Name</span><span class="kwrd">=&quot;PS.AACP.Stp&quot;</span> <span class="attr">Path</span><span class="kwrd">=&quot;&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">File</span> <span class="attr">Url</span><span class="kwrd">=&quot;StpTest.stp&quot;</span> <span class="attr">Type</span><span class="kwrd">=&quot;GhostableInLibrary&quot;</span> <span class="attr">IgnoreIfAlreadyExists</span><span class="kwrd">=&quot;TRUE&quot;</span><span class="kwrd">&gt;</span>
           <span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">Name</span><span class="kwrd">=&quot;Title&quot;</span> <span class="attr">Value</span><span class="kwrd">=&quot;StpTest&quot;</span> <span class="kwrd">/&gt;</span>
           <span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">Name</span><span class="kwrd">=&quot;Language&quot;</span> <span class="attr">Value</span><span class="kwrd">=&quot;1033&quot;</span> <span class="kwrd">/&gt;</span>
           <span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">Name</span><span class="kwrd">=&quot;FeatureID&quot;</span> <span class="attr">Value</span><span class="kwrd">=&quot;{D90095AD-86D4-4e55-AE28-119E21530552}&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">File</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">Module</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">Elements</span><span class="kwrd">&gt;</span></pre>
<p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2010/05/06/stp-uploaded-by-feature-doesnt-appear-on-create-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MOSS &#8211; Site Local Search incompatible with Server Name Mappings</title>
		<link>http://www.pranavsharma.com/blog/2010/02/26/moss-site-local-search-incompatible-with-server-name-mappings/</link>
		<comments>http://www.pranavsharma.com/blog/2010/02/26/moss-site-local-search-incompatible-with-server-name-mappings/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 01:25:04 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2010/02/26/moss-site-local-search-incompatible-with-server-name-mappings/</guid>
		<description><![CDATA[<p>In order to do site specific search (a.k.a. “This Site” scope) you can append a query string parameter as follows-</p> <p><a href="http://server/results.aspx?k=sharepoint&#38;u=http%3A%2F%2Fserver%2Flists">http://server/results.aspx?k=sharepoint&#38;u=http%3A%2F%2Fserver%2Flists</a></p> <p>Problem <br />The above will return zero results if you have a server name mapping configured in your search settings-</p> <p><a href="http://www.pranavsharma.com/blog/wp-content/uploads/2010/02/image.png"></a> </p> <p>Solution <br />Removing the server name mapping will resolve this [...]]]></description>
			<content:encoded><![CDATA[<p>In order to do site specific search (a.k.a. “This Site” scope) you can append a query string parameter as follows-</p>
<p><a href="http://server/results.aspx?k=sharepoint&amp;u=http%3A%2F%2Fserver%2Flists">http://server/results.aspx?k=sharepoint&amp;<strong>u=http%3A%2F%2Fserver%2Flists</strong></a></p>
<p><strong><u>Problem       <br /></u></strong>The above will return zero results if you have a server name mapping configured in your search settings-</p>
<p><a href="http://www.pranavsharma.com/blog/wp-content/uploads/2010/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.pranavsharma.com/blog/wp-content/uploads/2010/02/image_thumb.png" width="459" height="183" /></a> </p>
<p><strong><u>Solution</u></strong>    <br />Removing the server name mapping will resolve this issue and site specific search works as expected</p>
<p>&#160;</p>
<p>Tip: Adding a query string url restriction is equivalent to the following-   <br />&#160;<a href="http://www.pranavsharma.com/blog/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.pranavsharma.com/blog/wp-content/uploads/2010/02/image_thumb1.png" width="322" height="70" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2010/02/26/moss-site-local-search-incompatible-with-server-name-mappings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text selection disabled w/ Kwizcom Calendar Plus</title>
		<link>http://www.pranavsharma.com/blog/2010/01/26/text-selection-disabled-w-kwizcom-calendar-plus/</link>
		<comments>http://www.pranavsharma.com/blog/2010/01/26/text-selection-disabled-w-kwizcom-calendar-plus/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:52:37 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Kwizcom]]></category>
		<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2010/01/26/text-selection-disabled-w-kwizcom-calendar-plus/</guid>
		<description><![CDATA[<p>Problem <br />After installing Kwizcom Calendar 3.2.90, text selection is disabled on your sharepoint site on pages that have the calendar webpart. This was a huge issue for us since we had the minicalendar in the page header.</p> <p>Workaround <br />Modify one of the Kwizcom javascript files (“12\TEMPLATE\LAYOUTS\KWizCom_KSCP\KSCP.js”) to comment out the drag drop functionality [...]]]></description>
			<content:encoded><![CDATA[<p><strong><u>Problem        <br /></u></strong>After installing Kwizcom Calendar 3.2.90, text selection is disabled on your sharepoint site on pages that have the calendar webpart. This was a huge issue for us since we had the minicalendar in the page header.</p>
<p><strong><u>Workaround </u></strong>    <br />Modify one of the Kwizcom javascript files (“12\TEMPLATE\LAYOUTS\KWizCom_KSCP\KSCP.js”) to comment out the drag drop functionality (See lines 13, 21 &amp; 22) -</p>
<div class="csharpcode">
<div class="csharpcode">
<pre><span class="lnum">   1:  </span><span class="kwrd">function</span> kwiz_cal_DragDropOnLoad(q)</pre>
<pre><span class="lnum">   2:  </span>{</pre>
<pre><span class="lnum">   3:  </span>    g_WPQ = q;</pre>
<pre><span class="lnum">   4:  </span>&#160;</pre>
<pre><span class="lnum">   5:  </span>    <span class="rem">// attach onscroll event (needed for recalculating table cells positions)</span></pre>
<pre><span class="lnum">   6:  </span>    window.onscroll = kwiz_cal_Scroll;</pre>
<pre><span class="lnum">   7:  </span>    </pre>
<pre><span class="lnum">   8:  </span>    <span class="kwrd">if</span>(browseris.ie || browseris.safari)</pre>
<pre><span class="lnum">   9:  </span>    {</pre>
<pre><span class="lnum">  10:  </span>        kwiz_cal_Calculate_Cells();</pre>
<pre><span class="lnum">  11:  </span>        </pre>
<pre><span class="lnum">  12:  </span>        <span class="rem">// disable text selection for ie, safari</span></pre>
<pre><span class="lnum">  13:  </span>        <span class="rem">//document.onselectstart = function(event) {return false};</span></pre>
<pre><span class="lnum">  14:  </span>    }</pre>
<pre><span class="lnum">  15:  </span>    <span class="kwrd">else</span></pre>
<pre><span class="lnum">  16:  </span>    {</pre>
<pre><span class="lnum">  17:  </span>        <span class="rem">// firefox does not execute this function when assigning to onscroll event, but IE &amp; Chrome do</span></pre>
<pre><span class="lnum">  18:  </span>        kwiz_cal_Scroll(); </pre>
<pre><span class="lnum">  19:  </span>        </pre>
<pre><span class="lnum">  20:  </span>        <span class="rem">// disable text selection for firefox</span></pre>
<pre><span class="lnum">  21:  </span>        <span class="rem">//if (typeof document.body.style.MozUserSelect != &quot;undefined&quot;) </span></pre>
<pre><span class="lnum">  22:  </span>        <span class="rem">//    document.body.style.MozUserSelect = &quot;none&quot;;</span></pre>
<pre><span class="lnum">  23:  </span>    }</pre>
<pre><span class="lnum">  24:  </span>}</pre>
</p></div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p><strong><u>More Info</u></strong></p>
<p>The official word from Kwizcom Support on this issue is as follows: </p>
<p><em>“The issue is caused by dragdrop functionality. The new release version 3.3.00 will allow the users to disable drag drop through settings.&#160; Currently there is no exact timeline for release.”</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2010/01/26/text-selection-disabled-w-kwizcom-calendar-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Alert Template</title>
		<link>http://www.pranavsharma.com/blog/2009/11/10/custom-alert-template/</link>
		<comments>http://www.pranavsharma.com/blog/2009/11/10/custom-alert-template/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 04:14:26 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>

		<guid isPermaLink="false">http://www.pranavsharma.com/blog/2009/11/10/custom-alert-template/</guid>
		<description><![CDATA[<p>Are your alert emails defaulting to the generic template (SPAlertTemplateType.GenericList) even after you’ve specifically updated the list to use a custom alert email template (using myList.AlertTemplate)?</p> <p><a href="http://www.pranavsharma.com/blog/wp-content/uploads/2009/11/image.png"></a> </p> <p>Turns out that if you already have an existing alert setup on the list then even if you switch the list to use a different alert [...]]]></description>
			<content:encoded><![CDATA[<p>Are your alert emails defaulting to the generic template (<em>SPAlertTemplateType.GenericList</em>) even after you’ve specifically updated the list to use a custom alert email template (<em>using myList.AlertTemplate</em>)?</p>
<p><a href="http://www.pranavsharma.com/blog/wp-content/uploads/2009/11/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SPAlertTemplateType.GenericList" border="0" alt="SPAlertTemplateType.GenericList" src="http://www.pranavsharma.com/blog/wp-content/uploads/2009/11/image_thumb.png" width="642" height="234" /></a> </p>
<p>Turns out that if you already have an existing alert setup on the list then even if you switch the list to use a different alert template, sharepoint sends you alert emails using the template that was assigned to the list when you ORIGINALLY setup the alert.</p>
<p>So the <strong><u>SOLUTION</u></strong> is to delete your existing alert and re-subscribe to the list.</p>
<p>If you would like to know more on how to customize the alert email templates in sharepoint then this is a great resource: <a href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx">Customizing Alert Notifications and Alert Templates in Windows SharePoint Services 3.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2009/11/10/custom-alert-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MOSS 2007 &amp; Windows Server 2003 SP2</title>
		<link>http://www.pranavsharma.com/blog/2007/09/14/moss-2007-windows-server-2003-sp2/</link>
		<comments>http://www.pranavsharma.com/blog/2007/09/14/moss-2007-windows-server-2003-sp2/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 02:13:02 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://server204.webhostingpad.com/~epranav/blog/?p=296</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>We recently upgraded one of our SharePoint boxes to Service Pack 2 of Windows Server 2003. The upgrade broke our Content Deployment from the upgraded server to any other servers. The error message in Central Admin said something to the tune of &#8220;The remote web upload request failed&#8221;</p>
<p>Upon further investigation&nbsp;I found out from the IIS logs on the target machine that all the exported .cab files were actually being transferred over successfully and IIS was returning back a status code of 200 for each transfer. However on the last&nbsp;CAB file upload, IIS returned a status code of 400 every time&nbsp;for some reason. After that, everything just died out and the source machine could not confirm that the transfer was complete.</p>
<p><a href="http://robgarrett.com/cs/blogs/software/archive/2007/09/14/windows-server-2003-sp2-breaks-sharepoint-2007.aspx" target="_blank">Rob has a more detailed account</a> of why SP2 broke Content Deployment but in short, the fix involved making changes to the registry since service pack 2 has issues with networking and I am being told that there is no way to roll-back from SP2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2007/09/14/moss-2007-windows-server-2003-sp2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SharePoint Alerts</title>
		<link>http://www.pranavsharma.com/blog/2007/09/14/sharepoint-alerts/</link>
		<comments>http://www.pranavsharma.com/blog/2007/09/14/sharepoint-alerts/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 01:55:30 +0000</pubDate>
		<dc:creator>Pranav Sharma</dc:creator>
				<category><![CDATA[Sharepoint 2007 ( MOSS / WSS )]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://server204.webhostingpad.com/~epranav/blog/?p=295</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>SharePoint 2007 has really nice looking alerts that you can configure from the site itself. For example, you can subscribe to a discussion board by clicking &#8220;<font color="#0080ff">Actions &gt; Alert Me</font>&#8221; and you will start receiving alerts if and when there are changes on that discussion board.</p>
<p>However, if you want to make changes to how the alert email looks &#8211; perhaps to make the email look more like your corporate emails &#8211; you have to modify a file called <font color="#0080ff">alerttemplates.xml</font> located in <font color="#0080ff">C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML</font>. Combined-Knowledge has a great <a href="http://www.combined-knowledge.com/Downloads/Modify_Alert_Notifications.pdf" target="_blank">white-paper</a> on how to do so.</p>
<p>However, I just wasted a bit of my time figuring out why my changes were not taking effect. It turns out that after making changes to your alert template, you must use the <font color="#0080ff">stsadm -o updatealerttemplates</font> to update the alert template for the site collection you want. Then you <font color="#ff0000"><strong><u>MUST re-subscribe</u></strong></font> yourself to receive the alert by clicking &#8220;<font color="#0080ff">Actions &gt; Alert Me</font>&#8220;</p>
<p>It appears that the site creates a separate alert template for each user. Seems inefficient if it is true &#8211; can someone confirm this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pranavsharma.com/blog/2007/09/14/sharepoint-alerts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

