<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5285230663251728127</id><updated>2012-01-29T16:11:26.562-08:00</updated><category term='Ribbon'/><category term='Client Object Model'/><category term='permissions'/><category term='webpart'/><category term='401 Invalid credentials'/><category term='Requirement'/><category term='custom error page'/><category term='sharepoint 2010'/><category term='Anonymous sites'/><category term='Server'/><category term='Foundation'/><category term='Interview Questions'/><category term='ECMAscript'/><category term='Document Set'/><category term='Installation'/><title type='text'>SharePoint 2010</title><subtitle type='html'>Sharing my experiences with SharePoint 2010</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1921334225264691439</id><published>2011-12-26T07:15:00.000-08:00</published><updated>2011-12-26T15:39:47.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Anonymous sites'/><category scheme='http://www.blogger.com/atom/ns#' term='401 Invalid credentials'/><category scheme='http://www.blogger.com/atom/ns#' term='custom error page'/><title type='text'>Redirect to custom 401 page (invalid credentials)</title><content type='html'>&lt;h2&gt;





Properly setting up a custom 401 redirect page in SharePoint 2010&lt;/h2&gt;
&lt;br /&gt;
This article will get you going with setting up a custom 401 redirect page in SharePoint 2010.&lt;br /&gt;
&lt;br /&gt;
Note: this method is not confined to 401 errors only.. it can be any other type of errors at IIS level&lt;br /&gt;
Note 2: this is also not confined to SharePoint.. it can be very well applied to any ASP.Net web applications
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;





Configuring Anonymous site for invalid credentials&lt;/h3&gt;
&lt;h4&gt;
&lt;u&gt;&lt;i&gt;Enable Anonymous Access for Web Application&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;
1) Open the Central Admin.&lt;br /&gt;
2) Click Application Management  &amp;gt; Manage web applications &amp;gt; [[target webapp]] &amp;gt; Authenticated Providers
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://3.bp.blogspot.com/-0AaEQYErEJQ/TviJN8LtQpI/AAAAAAAAApk/JfT6JNiGBJs/s1600/401_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="341" src="http://3.bp.blogspot.com/-0AaEQYErEJQ/TviJN8LtQpI/AAAAAAAAApk/JfT6JNiGBJs/s400/401_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3) Select the zone in which anonymous access is to be granted&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://1.bp.blogspot.com/-J1X1ndRUHj0/TviKixHHQEI/AAAAAAAAApw/NIpgbzJb6oQ/s1600/401_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" src="http://1.bp.blogspot.com/-J1X1ndRUHj0/TviKixHHQEI/AAAAAAAAApw/NIpgbzJb6oQ/s400/401_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
4) Check the Enable anonymous access checkbox and save
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://2.bp.blogspot.com/-21Y0wZkL0ho/TviKpRMCNII/AAAAAAAAAp8/BmRoTsdGuAo/s1600/401_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="88" src="http://2.bp.blogspot.com/-21Y0wZkL0ho/TviKpRMCNII/AAAAAAAAAp8/BmRoTsdGuAo/s400/401_3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;u&gt;&lt;i&gt;Create Anonymous Access Site for the Web Application&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;
1) Open the site collection where anonymous site is to be created for the Web-App&lt;br /&gt;
2) Create a subsite named "help" or whatever..&lt;br /&gt;
3) Click Site Actions &amp;gt; Site Permissions &amp;gt; Anonymous Access
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://1.bp.blogspot.com/-_ibW2_mMPPg/TviK7LoaQQI/AAAAAAAAAqI/QHC6Kbil3VA/s1600/401_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="103" src="http://1.bp.blogspot.com/-_ibW2_mMPPg/TviK7LoaQQI/AAAAAAAAAqI/QHC6Kbil3VA/s400/401_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
4) Select Entire web site and click on Save
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://4.bp.blogspot.com/-RDZ0705ybwU/TviK_UVA__I/AAAAAAAAAqU/acrLAQ0xTwo/s1600/401_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="293" src="http://4.bp.blogspot.com/-RDZ0705ybwU/TviK_UVA__I/AAAAAAAAAqU/acrLAQ0xTwo/s400/401_5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h3&gt;
Setting up IIS to handle custom 401 page&lt;/h3&gt;
&lt;h4&gt;
&lt;u&gt;&lt;i&gt;Create a default redirect file&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;
1) Create a new html file.. Default.htm and place it in “C:\inetpub\custerr\en-US\Custom”&lt;br /&gt;
&lt;pre class="brush: plain"&gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
 &amp;lt;head&gt;
  &amp;lt;title&gt;Authentication Need Help ?&amp;lt;/title&gt;
  &amp;lt;style type="text/css"&gt;
   html,
   body {
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
   }
  &amp;lt;/style&gt;
  &amp;lt;script type="text/javascript"&gt;
  window.location = "http://SP2010:2000/help/default.aspx?IsDlg=1";
  &amp;lt;/script&gt;
 &amp;lt;/head&gt;
 &amp;lt;body oncontextmenu="return false;"&gt;
  
 &amp;lt;/body&gt;
&amp;lt;/html&gt;
&lt;/pre&gt;
2) Edit Default.htm &amp;gt; set the “window.location” value to the url of the anonymous site created above.&lt;br /&gt;
3) Save and Exit file edit

&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;u&gt;&lt;i&gt;Modify applicationHost.config to enable custom error on target Web-Application&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;
1) Open file “C:\Windows\System32\inetsrv\config\applicationHost.config” in notepad.&lt;br /&gt;
2) Find the tag (replace with valid webapplication Name as in IIS manager)
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;location path="xxxxxxxxxxxxxxxxxx"&amp;gt;&lt;/pre&gt;
3) Replace 
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;httperrors existingresponse="PassThrough"&amp;gt; 
with
&amp;lt;httperrors allowabsolutepathswhendelegated="true" errormode="Custom" existingresponse="PassThrough" lockattributes="allowAbsolutePathsWhenDelegated,defaultPath"&amp;gt;&lt;/pre&gt;
4) Save and Exit


&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;u&gt;&lt;i&gt;IIS entry for the redirect page in target Web-Application&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;
1) Open IIS Manager (Start &amp;gt; run &amp;gt; inetmgr)&lt;br /&gt;
2) Select the Web Application &amp;gt; Error Pages
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://1.bp.blogspot.com/-lRyhCX1b2mg/TviLM3fTBoI/AAAAAAAAAqg/us4z6l07Bp8/s1600/401_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://1.bp.blogspot.com/-lRyhCX1b2mg/TviLM3fTBoI/AAAAAAAAAqg/us4z6l07Bp8/s640/401_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
3) Add a custom error page for 401.1 and point it to the custom Default.htm 
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a href="http://4.bp.blogspot.com/-wtfgneEWUaY/TviLlM-JMeI/AAAAAAAAAqs/-c0viKl6yp4/s1600/401_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-wtfgneEWUaY/TviLlM-JMeI/AAAAAAAAAqs/-c0viKl6yp4/s400/401_7.png" width="387" /&gt;&lt;/a&gt;&lt;/div&gt;
4) Similarly, repeat step 3 to make an entry for 401.2&lt;br /&gt;
5) Also, Edit the default 401 item to set the same path and Exit IIS Mgr&lt;br /&gt;
6) Edit the web.Config of the webApp  and replace 
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;httperrors&amp;gt; 
with
&amp;lt;httperrors errormode="Custom" existingresponse="Auto"&amp;gt; 
&lt;/pre&gt;
7) Save and close.
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;ref:&lt;/strong&gt;&lt;br /&gt;
http://learn.iis.net/page.aspx/156/understanding-iis-configuration-delegation/&lt;br /&gt;
http://stackoverflow.com/questions/2472818/500-19-error-in-iis7-when-an-error-occurs&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;programmatically manipulate applicationhost.config&lt;/strong&gt;&lt;br /&gt;
http://learn.iis.net/page.aspx/242/extending-iis-schema-and-accessing-the-custom-sections-using-mwa/&lt;br /&gt;
http://learn.iis.net/page.aspx/165/how-to-use-microsoftwebadministration/&lt;br /&gt;
http://msdn.microsoft.com/en-us/library/microsoft.web.administration.aspx&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1921334225264691439?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1921334225264691439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2011/12/redirect-to-custom-401-page-invalid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1921334225264691439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1921334225264691439'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2011/12/redirect-to-custom-401-page-invalid.html' title='Redirect to custom 401 page (invalid credentials)'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-0AaEQYErEJQ/TviJN8LtQpI/AAAAAAAAApk/JfT6JNiGBJs/s72-c/401_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3510428412585223846</id><published>2011-10-18T05:38:00.000-07:00</published><updated>2011-10-18T05:50:11.521-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='webpart'/><category scheme='http://www.blogger.com/atom/ns#' term='permissions'/><title type='text'>Allow or Stop Contributors from modifying webpart properties</title><content type='html'>&lt;h2&gt;Allow or Stop Contributors from modifying webpart properties&lt;/h2&gt;Unlike MOSS 2007, by default SP2010 gives permissions for modifying the webpart properties to designers and above. This means that contributors will no longer have access to modify webpart properties.&lt;br /&gt;
&lt;br /&gt;
But there are a few things available that you can use to get more control over a webpart in a page..&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Add additional properties in design time&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-E-a45XZw0CI/Tp1wA_pVBFI/AAAAAAAAAog/0-_bCbb41d8/s1600/CA_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="195" src="http://4.bp.blogspot.com/-E-a45XZw0CI/Tp1wA_pVBFI/AAAAAAAAAog/0-_bCbb41d8/s640/CA_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Setting 'Safe Against Script' to false&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;This value is false by default which means SharePoint will not allow editing and configuration by site contributors.&lt;br /&gt;
If you want to continue to let a Web Part remain configurable, even bysite contributors, you can change the SafeAgainstScript attribute of the SafeControl declaration for that Web Part. &lt;br /&gt;
&lt;br /&gt;
A value of true instructs SharePoint to allow editing and configuration even by site contributors.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-89Ds075V1GM/Tp1xMszv47I/AAAAAAAAAos/6bJmGJfUqmk/s1600/CA_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://1.bp.blogspot.com/-89Ds075V1GM/Tp1xMszv47I/AAAAAAAAAos/6bJmGJfUqmk/s640/CA_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Programmatically allow certain properties to be configured&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;There is also a new attribute, RequiresDesignerPermissionAttribute, which you can use to tag a property to make it configurable only by users with designer rights or higher. This last attribute overrides any configuration in the web.config, so if you declare a control as SafeAgainstScript but also define a property marked with RequiresDesignerPermissionAttribute, that property will still not be configurable by a contributor, and will require at least a designer role, regardless of the web.config configuration.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-JgFIY8mJUaA/Tp1zIBYflnI/AAAAAAAAAo4/a0mC-vwfOAI/s1600/CA_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="528" src="http://3.bp.blogspot.com/-JgFIY8mJUaA/Tp1zIBYflnI/AAAAAAAAAo4/a0mC-vwfOAI/s640/CA_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3510428412585223846?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3510428412585223846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2011/10/allow-or-stop-contributors-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3510428412585223846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3510428412585223846'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2011/10/allow-or-stop-contributors-from.html' title='Allow or Stop Contributors from modifying webpart properties'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-E-a45XZw0CI/Tp1wA_pVBFI/AAAAAAAAAog/0-_bCbb41d8/s72-c/CA_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-703373484992468574</id><published>2011-05-24T04:44:00.001-07:00</published><updated>2011-05-24T04:49:38.103-07:00</updated><title type='text'>Create Lists and modify navigation using Powershell</title><content type='html'>&lt;h2&gt;Create Lists and modify navigation using Powershell&lt;/h2&gt;&lt;br /&gt;
The below code creates a new discussion board in every immediate subsite of the site url provided. It also adds a QuickLaunch link to the discussion board created.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:powershell"&gt;$SPSite = New-Object Microsoft.SharePoint.SPSite("http://localhost:1000/sites/demo"); 
$ParentWeb = $SpSite.OpenWeb(); 

$ChildWebs = $ParentWeb.Webs;
foreach($web in $ChildWebs)
{
      $TemplateType = $web.ListTemplates["Discussion Board"]; 
      #$web.Lists["Discussion Board"].Delete();

      $web.Lists.Add("Discussion Board","Discussion Board",$TemplateType); 
      $newList =  $web.Lists["Discussion Board"];

      $nodes = $web.Navigation.QuickLaunch;
      foreach($node in $nodes)
      {
            if($node.Title -eq "Lists")
            {
                  $navNode = New-Object Microsoft.SharePoint.Navigation.SPNavigationNode("Discussion Board", $newList.get_DefaultViewUrl(), $true);
                  $node.Children.AddAsLast($navNode);
            }
      }
      $web.Dispose(); 
}
$ParentWeb.Dispose();
$SPSite.Dispose();

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-703373484992468574?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/703373484992468574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2011/05/create-lists-and-modify-navigation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/703373484992468574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/703373484992468574'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2011/05/create-lists-and-modify-navigation.html' title='Create Lists and modify navigation using Powershell'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-4487899719533677624</id><published>2011-05-23T18:11:00.000-07:00</published><updated>2011-05-24T04:50:03.299-07:00</updated><title type='text'>Code fix - This page is not using a valid page layout</title><content type='html'>&lt;h2&gt;"This page is not using a valid page layout.  To correct the problem, edit page settings and select a valid page layout"&lt;/h2&gt;This error occurs when you built your publishing pages from one site hierarchy and moved it to a different hierarchy. e.g. if in your dev env, you built the pages in the root site of the site collection, and when you imported the site to one of the subsites in your prod env.&lt;br /&gt;
I this case, the pages will still be refering to the layouts page relative to its current location. This is wrong, because the layouts page will always reside in the root site of the site collection. &lt;br /&gt;
&lt;br /&gt;
To correct the referenced page layout location .. use one of the below methods (replace the proper url)&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Method 1 : Powershell&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush:powershell"&gt;[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing")
 
$web = Get-SPWeb -Identity "http://localhost:1000/sites/corp/mkt";
 
$spPubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web);
$pages = $spPubWeb.PagesList;
 
foreach($item in $pages.Items)
{
  $pubPage = [Microsoft.SharePoint.Publishing.PublishingPage]::GetPublishingPage($item)
 
  $url = new-object Microsoft.SharePoint.SPFieldUrlValue($pubPage.ListItem[[Microsoft.SharePoint.Publishing.FieldId]::PageLayout].ToString())
  if($url -ne $null)
  {   
    if($url.Url -match 'MyArticlePage')
  {  
  $newurl = new-object Microsoft.SharePoint.SPFieldUrlValue("http://localhost:1000/sites/corp/_catalogs/masterpage/MyArticlePage.aspx, My Article Page")
  $pubPage.Name
  $pubPage.CheckOut()
  $pubPage.ListItem[[Microsoft.SharePoint.Publishing.FieldId]::PageLayout] = $newurl
  $pubPage.ListItem.UpdateOverwriteVersion()
 
  $pubPage.ListItem.File.CheckIn("Fixed URL to page layout.", [Microsoft.SharePoint.SPCheckinType]::MajorCheckIn);
  }
  }
 
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Method 2 : Console App&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush:c#"&gt;private static void FixPageLayoutsUrl()
{
  using (SPSite site = new SPSite("http://localhost:1000/sites/corp/mkt"))
  using (SPWeb web = site.OpenWeb())
  {
    PublishingWeb spPubWeb = PublishingWeb.GetPublishingWeb(web);
    SPList pages = spPubWeb.PagesList;

    foreach (SPListItem item in pages.Items)
    {
      PublishingPage pubPage = PublishingPage.GetPublishingPage(item);

      SPFieldUrlValue url = new SPFieldUrlValue(pubPage.ListItem[FieldId.PageLayout].ToString());
      if (url != null)
      {
        if (url.Url.Contains("MyArticlePage"))
        {
          // The page layouts page will always be in the root site of the site collection
          SPFieldUrlValue newurl =
              new SPFieldUrlValue("http://localhost:1000/sites/corp/_catalogs/masterpage/MyArticlePage.aspx, My Article Page");
          Console.WriteLine(pubPage.Name);
          pubPage.CheckOut();
          pubPage.ListItem[FieldId.PageLayout] = newurl;
          pubPage.ListItem.UpdateOverwriteVersion();

          pubPage.ListItem.File.CheckIn("Fixed URL to page layout.", SPCheckinType.MajorCheckIn);
        }
      }

    }
  }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-4487899719533677624?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/4487899719533677624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2011/05/code-fix-this-page-is-not-using-valid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/4487899719533677624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/4487899719533677624'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2011/05/code-fix-this-page-is-not-using-valid.html' title='Code fix - This page is not using a valid page layout'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-6941544928899244126</id><published>2011-04-01T05:58:00.000-07:00</published><updated>2011-04-01T06:25:20.417-07:00</updated><title type='text'>open pdf files in browser</title><content type='html'>&lt;h2&gt;Open PDF files in browser in Sharepoint 2010&lt;/h2&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Web Application level setting: Method 1 (UI)&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;• Go to SharePoint 2010 Central Administration &amp;gt; Application Management &amp;gt; Manage Web Applications&lt;br /&gt;
• Select the row of your web application&lt;br /&gt;
• Click General Settings in the ribbon&lt;br /&gt;
• Scroll down to Browser File Handling and select Permissive&lt;br /&gt;
• Click Ok&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Web Application level setting: Method 2&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: powershell"&gt;$webApp = Get-SPWebApplication http://intranet.domain
$webApp.BrowserFileHandling = "permissive"
$webApp.update()
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Web Application level setting: Method 3 (recommended)&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: powershell"&gt;$webApp = Get-SPWebApplication http://intranet.domain
If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains "application/pdf")
{
  Write-Host -ForegroundColor White "Adding Pdf MIME Type..."
  $webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
  $webApp.Update()
  Write-Host -ForegroundColor White "Added and saved."
} Else {
  Write-Host -ForegroundColor White "Pdf MIME type is already added."
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Site Collection level&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: powershell"&gt;$site = get-spsite "http://intranet.domain/sites/somesite"
foreach ( $subsite in $site.allwebs ) 
{ 
 foreach ($list in $subsite.Lists) 
 { 
  if($list.browserfilehandling -eq "Strict") 
  { 
   $list.browserfilehandling = "Permissive"; 
   $list.update(); 
  } 
 } 
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Site level ( SPWeb )&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: powershell"&gt;$web = Get-SPWeb "http://intranet.domain/sites/somesite/someweb"
foreach ($list in $web.Lists) 
{ 
 if($list.browserfilehandling -eq "Strict") 
 { 
  $list.browserfilehandling = "Permissive"; 
  $list.update(); 
 } 
} 
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;List Level&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: powershell"&gt;$web= Get-SPWeb "http://intranet.domain/sites/somesite/someweb"
$list = $web.Lists["MyList"] 
if($list.browserfilehandling -eq "Strict") 
{ 
 $list.browserfilehandling = "Permissive"; 
 $list.update(); 
} 
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-6941544928899244126?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/6941544928899244126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2011/04/open-pdf-files-in-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6941544928899244126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6941544928899244126'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2011/04/open-pdf-files-in-browser.html' title='open pdf files in browser'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2666745201491442423</id><published>2010-12-23T13:17:00.000-08:00</published><updated>2010-12-23T13:28:34.696-08:00</updated><title type='text'>How to read Technical Books</title><content type='html'>&lt;h2&gt;How to read Technical Books&lt;/h2&gt;&lt;br /&gt;
Often I struggled to keep my interest in reading technical books for more than half hour.. sometime I loose interest in 15 mins.. unless if the subject is what I am currently working on or when I am trying to find a solution for a problem I am stuck with. During these times I can read for many hours tirelessly till I find a solution. &lt;br /&gt;
&lt;br /&gt;
So searching for a good way to read.. I found the following two comments by somebody.. so I am quoting it here..&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Technique to read&lt;/h3&gt;(ref: http://ask.metafilter.com/136021/How-can-I-learn-to-read-technical-documents, brainwane)&lt;br /&gt;
&lt;br /&gt;
Technology is an ecology. It's a bunch of moving parts that fit together -- sometimes well, sometimes badly. Neal Stephenson said that learning Unix is more like learning anatomy than like learning physics, and I find that true of technical learning in general.&lt;br /&gt;
&lt;br /&gt;
To summarize: Skim first, really fast, for the headings/subheadings. Draw an anatomy, a diagram of all the parts and how they fit together. Imagine yourself in a conversation with the author. What questions would you ask if you were in a one-on-one conversation with her, or if you were trying to implement or use that technology? Then skim for the answer, annotate your diagram, and think up the next question. What's the usual flow of information through all these components? What's enforcing the rules, and what's pushing the data through the system? What are possible attacks or failure points? And what defenses are built in to resist or recover from attacks or failures?&lt;br /&gt;
&lt;br /&gt;
With any skill, there's theory and there's practice. You're obviously just fine at the practice part, since you learn by doing. If you're trying to learn a new technical subject, make up problems for yourself, or get books that have a lot of practice exercises (like, every other page). Learning a skill isn't like memorizing history.&lt;br /&gt;
&lt;br /&gt;
And since you learn through conversation, as you learn a new subject, try teaching it to someone else. In my experience, coworkers are fine with me taking up a few minutes of their time with "I need to explain this to someone else to make sure I understand it myself," followed by whiteboarding and chatter. Or get a study buddy with whom you can discuss the material topic-by-topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Learn to Stop&lt;/h3&gt;(ref: http://ask.metafilter.com/136021/How-can-I-learn-to-read-technical-documents, grumblebee )&lt;br /&gt;
&lt;br /&gt;
I've learned to STOP reading BEFORE my brain starts fogging over. If that tends to happen after ten minutes, I stop reading after eight minutes. If I keep reading into the fog -- or, worse, try to push through it -- the fog gets even thicker the next time. In fact, there may not be a next time. I probably won't return to the book because I associate it with fog and frustration. &lt;br /&gt;
&lt;br /&gt;
I use a similar technique when I write prose and program code. I quit when I'm still alert, and I quit in the middle of a &lt;br /&gt;
&lt;br /&gt;
...sentence or statement. That makes it easier to jump back in next time. It leaves me with a cliffhanger. My brain WANTS to resolve it. And I don't associate writing or programming with fog. I associate it with something that I always have to quit too soon. &lt;br /&gt;
&lt;br /&gt;
I've found that the fog is a very reliable message from my brain telling me to STOP. Actually, it's telling me that I should have stopped earlier, and that I'm now doing damage. It sucks if I "have to" get a chapter read that night. Too bad. I need to quit anyway. Continuing is counter-productive. Whether I "need" to keep reading or not, I simply can't force my brain to work beyond its limits. Similarly, you may "need" to carry a heavy box up the stairs, but if your muscles are completely fatigued, you won't be able to. And you'll probably injure yourself if you try. And you'll definitely associate heavy boxes with pain from then on.&lt;br /&gt;
&lt;br /&gt;
The good news is that if you quit while you're ahead, you'll find that you can gradually read for longer and longer periods. Your brain starts trusting you not to fatigue it. &lt;br /&gt;
&lt;br /&gt;
I think it also helps to have various materials at easy reach. There are about five subjects I want to learn over the next year. One of them is Functional Programming. It's tough, and the fog descends pretty fast. But I have about ten different books lying around my apartment. Every once in a while, I pick one up and read a couple of pages. No pressure. Then I quit for a week or two. I find that my brain gradually warms up to the subject.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2666745201491442423?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2666745201491442423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/12/how-to-read-technical-books.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2666745201491442423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2666745201491442423'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/12/how-to-read-technical-books.html' title='How to read Technical Books'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3733344173601181223</id><published>2010-12-06T14:47:00.000-08:00</published><updated>2010-12-07T08:56:46.194-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Document Set'/><title type='text'>programmatically create document set, add or move files, GetDocumentSetById</title><content type='html'>&lt;h2&gt;How to programmatically create document set, add or move files, GetDocumentSetById&lt;/h2&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Create a new document set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static DocumentSet CreateDocumentSet(SPList list, string DocumentSetName)
{
 SPContentType docsetCT = list.ContentTypes["Document Set"];
 Hashtable properties = new Hashtable();
 properties.Add("DocumentSetDescription", "New Document Set");

 SPFolder parentFolder = list.RootFolder;

 DocumentSet docSet = DocumentSet.Create(parentFolder, DocumentSetName, docsetCT.Id, properties, true);

 return docSet;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Get a document set by id&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static DocumentSet GetDocumentSetById(this SPList list, int ID)
{
 return DocumentSet.GetDocumentSet(list.GetItemById(ID).Folder);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Check to see it the current list item is a Document set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static bool IsDocumentSet(this SPListItem item)
{
 bool documentSetItem = false;
 DocumentSet documentSet = null;

 if (null != item &amp;&amp; item.IsFolder())
 {
  documentSet = DocumentSet.GetDocumentSet(item.Folder);

  if (null != documentSet)
   documentSetItem = true;
 }
 return documentSetItem;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Check to see if the current listitem is a item within a Document Set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static bool IsDocumentSetItem(this SPListItem item)
{
 bool documentSetItem = false;
 DocumentSet documentSet = null;

 if (null != item &amp;&amp; null != item.File)
 {
   documentSet = DocumentSet.GetDocumentSet(item.File.ParentFolder);

   if (null != documentSet)
    documentSetItem = true;
 }
 return documentSetItem;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Move a file to a document set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static SPFile MoveFile(SPWeb web, string sourceUrl, DocumentSet docSet)
{
 SPFile file = web.GetFile(sourceUrl);
 string destinationFolderUrl = docSet.Folder.Url;

 destinationFolderUrl = (!destinationFolderUrl.EndsWith("/")) ? destinationFolderUrl + "/" : destinationFolderUrl;
 file.MoveTo(destinationFolderUrl + file.Name, true);
 web.Update();

 return web.GetFile(web.Url + "/" + destinationFolderUrl + file.Name);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Copy a file to a document set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static SPFile CopyFile(SPWeb web, string sourceUrl, DocumentSet docSet)
{
 SPFile file = web.GetFile(sourceUrl);
 string destinationFolderUrl = docSet.Folder.Url;

 destinationFolderUrl = (!destinationFolderUrl.EndsWith("/")) ? destinationFolderUrl + "/" : destinationFolderUrl;
 file.CopyTo(destinationFolderUrl + file.Name, true);
 web.Update();

 return web.GetFile(web.Url + "/" + destinationFolderUrl + file.Name);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Create a 'link to document' file in a document set&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static SPFile CreateDocumentLink(this SPList list, string documentName, string documentUrl, DocumentSet docSet)
{
 SPFile file = null;
 SPListItem item = null;
 if (list is SPDocumentLibrary)
 {
  SPDocumentLibrary docLib = (SPDocumentLibrary)list;
  if (docLib.ContentTypesEnabled)
  {
   SPContentType myCType = list.ContentTypes["Link to a Document"];
   if (myCType != null)
   {

    //replace string template with values
    string redirectAspx = RedirectAspxPage();
    redirectAspx.Replace("{0}", documentUrl);

    //should change the name of the .aspx file per item
    file = docSet.Folder.Files.Add(documentName + ".aspx", UTF8Encoding.UTF8.GetBytes(redirectAspx));

    //set list item properties
    item = file.Item;


    item["ContentTypeId"] = myCType.Id;
    item.Update();

    if (item["ContentType"].ToString() == "Link to a Document")
    {
     SPFieldUrlValue fieldUrl = new SPFieldUrlValue() { Description = documentName, Url = documentUrl };

     item["URL"] = fieldUrl;
     item.Update();
    }
   }
  }
 }

 return file;
}

public static string RedirectAspxPage()
{
 StringBuilder builder = new StringBuilder();
 builder.Append("&amp;lt;%@ Assembly Name='Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' %&amp;gt;");
 builder.Append("&amp;lt;%@ Register TagPrefix='SharePoint' Namespace='Microsoft.SharePoint.WebControls' Assembly='Microsoft.SharePoint' %&amp;gt;");
 builder.Append("&amp;lt;%@ Import Namespace='System.IO' %&amp;gt;");
 builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint' %&amp;gt;");
 builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint.Utilities' %&amp;gt;");
 builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint.WebControls' %&amp;gt;");
 builder.Append("&amp;lt;html xmlns:mso=\"urn:schemas-microsoft-com:office:office\" xmlns:msdt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"&amp;gt;");
 builder.Append("&amp;lt;head&amp;gt;");
 builder.Append("&amp;lt;meta name=\"WebPartPageExpansion\" content=\"full\" /&amp;gt; &amp;lt;meta name='progid' content='SharePoint.Link' /&amp;gt; ");
 builder.Append("&amp;lt;!--[if gte mso 9]&amp;gt;&amp;lt;SharePoint:CTFieldRefs runat=server Prefix=\"mso:\" FieldList=\"FileLeafRef,URL\"&amp;gt;&amp;lt;xml&amp;gt;");
 builder.Append("&amp;lt;mso:CustomDocumentProperties&amp;gt;");
 builder.Append("&amp;lt;mso:ContentTypeId msdt:dt=\"string\"&amp;gt;0x01010A00DC3917D9FAD55147B56FF78B40FF3ABB&amp;lt;/mso:ContentTypeId&amp;gt;");
 builder.Append("&amp;lt;mso:IconOverlay msdt:dt=\"string\"&amp;gt;|docx|linkoverlay.gif&amp;lt;/mso:IconOverlay&amp;gt;");
 builder.Append("&amp;lt;mso:URL msdt:dt=\"string\"&amp;gt;{0}, {0}&amp;lt;/mso:URL&amp;gt;");
 builder.Append("&amp;lt;/mso:CustomDocumentProperties&amp;gt;");
 builder.Append("&amp;lt;/xml&amp;gt;&amp;lt;/SharePoint:CTFieldRefs&amp;gt;&amp;lt;![endif]--&amp;gt;");
 builder.Append("&amp;lt;/head&amp;gt;");
 builder.Append("&amp;lt;body&amp;gt;");
 builder.Append("&amp;lt;form id='Form1' runat='server'&amp;gt;");
 builder.Append("&amp;lt;SharePoint:UrlRedirector id='Redirector1' runat='server' /&amp;gt;");
 builder.Append("&amp;lt;/form&amp;gt;");
 builder.Append("&amp;lt;/body&amp;gt;");
 builder.Append("&amp;lt;/html&amp;gt;");
 return builder.ToString();
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3733344173601181223?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3733344173601181223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/12/programmatically-create-document-set.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3733344173601181223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3733344173601181223'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/12/programmatically-create-document-set.html' title='programmatically create document set, add or move files, GetDocumentSetById'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-7147598240343814021</id><published>2010-11-29T21:50:00.000-08:00</published><updated>2010-11-29T21:59:56.190-08:00</updated><title type='text'>The SharePoint item being crawled returned an error when attempting to download the item.</title><content type='html'>&lt;h2&gt;SharePoint Search error - "The SharePoint item being crawled returned an error when attempting to download the item."&lt;/h2&gt;&lt;br /&gt;
If you are running a crawl and noticed that you are getting the above error on certain site or site collection.. you can correct it by one or combination of the following solutions&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Avoid placing core results webpart on homepage.&lt;/li&gt;
&lt;li&gt;Make sure that all custom webpages are checked in.&lt;/li&gt;
&lt;li&gt;If you have any page other than the default.aspx as the hompage at the root site of the site collection, then set the default.aspx as homepage and run crawl. Once it is successful, you can go ahead and set the other page as your homepage.&lt;/li&gt;
&lt;li&gt;Try installing Aug CUs. &lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-7147598240343814021?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/7147598240343814021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/sharepoint-item-being-crawled-returned.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7147598240343814021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7147598240343814021'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/sharepoint-item-being-crawled-returned.html' title='The SharePoint item being crawled returned an error when attempting to download the item.'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-6367190195266359401</id><published>2010-11-23T13:07:00.000-08:00</published><updated>2010-11-23T13:45:01.156-08:00</updated><title type='text'>CSS Tips</title><content type='html'>&lt;h2&gt;SharePoint 2010 CSS Tips &lt;/h2&gt;Compiled from various SharePoint experts like Randy Drisgill, Heather Solomon, etc.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Add this style statement to your CSS file to hide the Ribbon when not in use: &lt;pre&gt;&amp;lt;style type="text/css"&amp;gt;
.s4-ribbonrowhidetitle {display: none;}
&amp;lt;/style&amp;gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Add .s4-nosetwidth class to #s4-workspace DIV element in master page for fixed width designs &amp; fluid designs w/ margins.&lt;/li&gt;
&lt;li&gt;Hiding the Recently Modified on Team Sites &lt;pre&gt;&amp;lt;style type="text/css"&amp;gt;
  .s4-recentchanges { display: none; } 
&amp;lt;/style&amp;gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Hiding the Quick Launch &lt;br /&gt;
&lt;pre&gt;&amp;lt;style type="text/css"&amp;gt;
  body #s4-leftpanel { display: none; } 
  .s4-ca { margin-left: 0px; } 
&amp;lt;/style&amp;gt;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Add .s4-notdlg class to any element in the master page you don't want to show up in the pop-up modal dialog windows.&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-6367190195266359401?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/6367190195266359401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/css-tips.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6367190195266359401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6367190195266359401'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/css-tips.html' title='CSS Tips'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2898957939162340062</id><published>2010-11-18T07:17:00.000-08:00</published><updated>2010-11-18T08:28:10.198-08:00</updated><title type='text'>Hide / Disable My Site, My Profile and Social Tags</title><content type='html'>&lt;h2&gt;Hide / Disable My Site, My Profile and Social Tags&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TOVSRMihjjI/AAAAAAAAAjI/ruRYUih1yNM/s1600/MySiteMyProfile.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" ox="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TOVSRMihjjI/AAAAAAAAAjI/ruRYUih1yNM/s320/MySiteMyProfile.png.jpg" width="252" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h3&gt;To hide My Site, My Profile and disable Social Tags&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Go to Central Administration &amp;gt; Application Management &amp;gt; Manage service applications &amp;gt; User profile service application &lt;/li&gt;
&lt;li&gt;From the ribbon, Click “Manage User Permissions” under People&lt;/li&gt;
&lt;li&gt;In the “Permissions for User Profile Service Application” pop up, select a user group, e.g. All authenticated Users. &lt;br /&gt;
Uncheck the “Permissions” item, base on what you want to disable. Click OK to save the settings.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TOVEbCeTPPI/AAAAAAAAAjA/JO-stBVx_ZY/s1600/UserPermissions.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="352" ox="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TOVEbCeTPPI/AAAAAAAAAjA/JO-stBVx_ZY/s400/UserPermissions.png.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Information&lt;/strong&gt;&lt;br /&gt;
Unchecking Use Personal Features will hide My Profile&lt;br /&gt;
Unchecking Create Personal Site will hide My Site &lt;br /&gt;
Unchecking Use Social Features will disable Tagging, Note Board, and Ratings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Hiding the social tags across the farm&lt;/strong&gt;&lt;br /&gt;
Since unchecking the the above feature will only disable the tags, it is still visible on your web pages. You can completely remove them by opting for one of the below methods..&lt;br /&gt;
To &lt;u&gt;completely remove from all web applications&lt;/u&gt;.. go to CA &amp;gt; System Settings &amp;gt; Farm Management &amp;gt; Manage farm feature&lt;br /&gt;
Deactivate the feature "Social Tages and Note Board Ribbon controls" feature.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_g-JN_WB_wo4/TOVEbXm_zJI/AAAAAAAAAjE/fd_YjgIA0Vk/s1600/socialfarmfeature.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="60" ox="true" src="http://2.bp.blogspot.com/_g-JN_WB_wo4/TOVEbXm_zJI/AAAAAAAAAjE/fd_YjgIA0Vk/s640/socialfarmfeature.png.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;strong&gt;Hiding the social tags for specific site or web&lt;/strong&gt;&lt;br /&gt;
If some some reason, you didnt want the social tag to be shown in a particular site or web, you can use css styling to hide it. Following CSS will hide the tags..&lt;br /&gt;
&lt;pre class="brush: css"&gt;.s4-socialdata-notif {
display:none;
}
&lt;/pre&gt;you can put this directly on the page using a content editor webpart or use a custom css file and include it in the masterpage&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2898957939162340062?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2898957939162340062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/hide-disable-my-site-my-profile-and.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2898957939162340062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2898957939162340062'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/hide-disable-my-site-my-profile-and.html' title='Hide / Disable My Site, My Profile and Social Tags'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/TOVSRMihjjI/AAAAAAAAAjI/ruRYUih1yNM/s72-c/MySiteMyProfile.png.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-5628005900649806628</id><published>2010-11-10T09:36:00.000-08:00</published><updated>2010-11-23T13:11:14.644-08:00</updated><title type='text'>Hide Columns in SharePoint New, Edit and Disp Forms: Poweshell</title><content type='html'>&lt;h2&gt;Hide Columns in SharePoint New, Edit and Disp Forms: Powershell &lt;/h2&gt;&lt;br /&gt;
So here is the scenario, you have a issue tracking list and if you only want to introduce certain hidden columns on your New and Disp forms but not your Edit form as an example. You can have any combination for these requirements.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_g-JN_WB_wo4/TOh1qQDjMsI/AAAAAAAAAjc/82U9UB1QQH8/s1600/NewForm_Ori.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" ox="true" src="http://2.bp.blogspot.com/_g-JN_WB_wo4/TOh1qQDjMsI/AAAAAAAAAjc/82U9UB1QQH8/s320/NewForm_Ori.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Since the issues are logged by the QA or end-user, we want to hide the Assigned To, Due Date, Priority and Impact from the new form. We want the user editing, typically the dev team lead, to assign these values.&lt;br /&gt;
&lt;br /&gt;
There are several ways you can achieve this.. choose the best that fits your need... or comfortable with.&lt;br /&gt;
&lt;br /&gt;
1. PowerShell&lt;br /&gt;
2. Programmatically&lt;br /&gt;
3. Custom Forms (SharePoint Designer)&lt;br /&gt;
4. ContentTypes&lt;br /&gt;
5. jQuery&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Using Powershell&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;First we need to get the id of the fields to be hidden. A very important tool in your armor is a free tool called SharePoint Manager 2010. &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/TOh1qRs4imI/AAAAAAAAAjg/O8lQYgyQjBY/s1600/SPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="259" ox="true" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/TOh1qRs4imI/AAAAAAAAAjg/O8lQYgyQjBY/s320/SPM.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Navigate to your Web-App &amp;gt; Site Collection &amp;gt; Site &amp;gt; List &amp;gt; Fields and get the ids of the fields you want to hide&lt;/li&gt;
&lt;li&gt;Next we will use another important free tool PowerGUI and write the following powershell script&lt;/li&gt;
&lt;pre class="brush: ps"&gt;#$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
#if ($snapin -eq $null) {
#Write-Host "Loading SharePoint Powershell Snapin"
#Add-PSSnapin "Microsoft.SharePoint.Powershell"
#}

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$WebUrl = "http://sp2010vmc002/hidecoldemo"
Write-Host "Opening Web" $WebUrl
$web = Get-SPWeb $WebUrl

####### Issue Tracker List ######
$list = $web.Lists["IssueTracker1"];

#Assigned To
$FieldGuid = New-Object System.Guid("53101f38-dd2e-458c-b245-0c236cc13d1a");
$Field = $list.Fields[$FieldGuid];

$Field.ShowInNewForm = $false;
$Field.ShowInDisplayForm = $true;
$Field.ShowInEditForm = $true;

$Field.Update();
$list.Update();

#Due Date
$FieldGuid = New-Object System.Guid("cd21b4c2-6841-4f9e-a23a-738a65f99889");
$Field = $list.Fields[$FieldGuid];

$Field.ShowInNewForm = $false;
$Field.ShowInDisplayForm = $true;
$Field.ShowInEditForm = $true;

$Field.Update();
$list.Update();

#Similarly for Impact and Propority..

$Web.Dispose();  
&lt;/pre&gt;&lt;li&gt;The resultant new form will look like this&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TOh1qKwIGLI/AAAAAAAAAjY/rcwwE4Sn4A8/s1600/NewForm_Final.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="224" ox="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TOh1qKwIGLI/AAAAAAAAAjY/rcwwE4Sn4A8/s320/NewForm_Final.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
http://blog.qumsieh.ca/2010/02/16/hide-columns-in-sharepoint-new-edit-and-disp-forms/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-5628005900649806628?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/5628005900649806628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/hide-columns-in-sharepoint-new-edit-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5628005900649806628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5628005900649806628'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/hide-columns-in-sharepoint-new-edit-and.html' title='Hide Columns in SharePoint New, Edit and Disp Forms: Poweshell'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_g-JN_WB_wo4/TOh1qQDjMsI/AAAAAAAAAjc/82U9UB1QQH8/s72-c/NewForm_Ori.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-298339226014046323</id><published>2010-11-10T08:39:00.000-08:00</published><updated>2010-11-10T08:40:41.368-08:00</updated><title type='text'>XML Parsing Error: no element found</title><content type='html'>&lt;h3&gt;XML Parsing Error: no element found&lt;/h3&gt;&lt;br /&gt;
This error can occur for reasons below..&lt;br /&gt;
1. The common reason for XML Parsing Error: no element found is missing closing tag for one or two html element, so double check everything to make sure not miss any closing(&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;) tags in your custom forms.&lt;br /&gt;
&lt;br /&gt;
2. This may also be a misleading error for a custom edit/display form you created and it does not find the list you are trying to fetch records from.&lt;br /&gt;
&lt;br /&gt;
E.g. suppose you created a custom form and attached it to a contenttype. This custom form is placed in the layouts folder. &lt;br /&gt;
When the form in invoked, the listid and itemid is passed as parameters. If the list is in the subsite and the link to the custom form starts with "/_layouts..." then your form will try to find the list in the root site rather the subsite. So make sure that you specify "_layouts... " without the slash in the begining so that your form is rendered under the subsite path and it will find your list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-298339226014046323?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/298339226014046323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/xml-parsing-error-no-element-found.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/298339226014046323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/298339226014046323'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/11/xml-parsing-error-no-element-found.html' title='XML Parsing Error: no element found'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2268290372938699731</id><published>2010-10-12T12:16:00.001-07:00</published><updated>2010-10-12T12:34:41.358-07:00</updated><title type='text'>Configuring Search Service Application - Accounts</title><content type='html'>&lt;span xmlns=""&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 16pt;"&gt;&lt;strong&gt;Accounts &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;There is 2 accounts that is required for search.. one for the search service and other for content access. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;SharePoint Server search service account&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The SharePoint Server 2010 Search service account is used as the service account for the SharePoint Server 2010 Search service. The SharePoint Server Search Service is an NT Service, which is used by all Search Service Applications. For any given server, there is only one instance of this service. &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;&lt;strong&gt;&lt;em&gt;The SharePoint Server 2010 search service account requires the following permission configuration setting: &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The search service account must not be a built-in account in order to access the database. Examples of built-in accounts are Local Service and Network Service.&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The SharePoint Server 2010 search service account is granted access to the propagation location share (or shares) on all search query servers in a farm. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;&lt;strong&gt;&lt;em&gt;The following machine-level permission is configured automatically: &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The SharePoint Server 2010 search service account is a member of WSS_WPG. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;&lt;strong&gt;&lt;em&gt;The following SQL Server and database permissions are configured automatically: &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;This account is assigned to the WSS_CONTENT_APPLICATION_POOLS role associated with the farm configuration database. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;This account is assigned to the WSS_CONTENT_APPLICATION_POOLS role associated with the SharePoint_Admin content database. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;E.g.: 'sp_search' &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt; text-decoration: underline;"&gt;&lt;strong&gt;Default Content Access Account&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The default content access account is used within a specific service application to crawl content, unless a different authentication method is specified by a crawl rule for a URL or URL pattern. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;&lt;strong&gt;&lt;em&gt;This account requires the following permission configuration settings: &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The default content access account must be a domain user account and it must have read access to external or secure content sources that you want to crawl by using this account. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;For SharePoint Server sites that are not part of the server farm, this account must be explicitly granted full read permissions to the Web applications that host the sites. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;This account must not be a member of the farm administrators group. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The search service will access all content using this account. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;The account will be added to the &lt;span style="color: red;"&gt;Full Read policy &lt;strong&gt;*&lt;/strong&gt;, &lt;span style="color: #0d0d0d;"&gt;giving it read-only access to all content. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;For proper search functionality and information security, do not use an administrator account, and do not use accounts that can modify content.&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #0d0d0d; font-family: Segoe UI; font-size: 10pt;"&gt;This should be a unique, dedicated only for Search account&lt;br /&gt;
&lt;span style="color: #000099;"&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TLS16cw1AHI/AAAAAAAAAh8/2WNOLMKTDsw/s1600/Full+Read+Policy.png.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" ex="true" height="384" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TLS16cw1AHI/AAAAAAAAAh8/2WNOLMKTDsw/s640/Full+Read+Policy.png.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Full Read Policy&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Segoe UI; font-size: 10pt;"&gt;E.g.: 'sp_search_crawl' &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2268290372938699731?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2268290372938699731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/10/configuring-search-service-application.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2268290372938699731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2268290372938699731'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/10/configuring-search-service-application.html' title='Configuring Search Service Application - Accounts'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_g-JN_WB_wo4/TLS16cw1AHI/AAAAAAAAAh8/2WNOLMKTDsw/s72-c/Full+Read+Policy.png.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1047169079947080653</id><published>2010-10-07T17:18:00.001-07:00</published><updated>2010-10-07T17:46:45.228-07:00</updated><title type='text'>programmatically add delete modify item permissions</title><content type='html'>&lt;h2&gt;How to programmatically add delete modify item permissions in SharePoint&lt;/h2&gt;&lt;br /&gt;
Note: SPPrincipal can be either an SPUser or SPGroup Object&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Breaking Inheritance&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;//specifies whether the item has unique security 
//or inherits its role assignments from a parent object.
item.HasUniqueRoleAssignments

//Stops inheriting permissions from parent object
// if true, it will keep all existing users
// false, to remove all users
item.BreakRoleInheritance(true);

//Removes the local role assignments 
//and reverts to role assignments from the parent object.
item.ResetRoleInheritance();
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Adding Permissions to an item&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;//SPGroup group = web.Groups[0];
//SPUser user = web.Users[0];
//SPUser user2 = web.EnsureUser("mangaldas.mano");
//SPUser user3 = web.EnsureUser("Domain Users"); ;
//SPPrincipal[] principals = { group, user, user2, user3 };
public static void SetPermissions(this SPListItem item, IEnumerable&lt;spprincipal&gt; principals, SPRoleType roleType)
{
 if (item != null)
 {

  foreach (SPPrincipal principal in principals)
  {
   SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
   SetPermissions(item, principal, roleDefinition);
  }
 }
}


public static void SetPermissions(this SPListItem item, SPUser user, SPRoleType roleType)
{
 if (item != null)
 {
  SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
  SetPermissions(item, (SPPrincipal)user, roleDefinition);
 }
}

public static void SetPermissions(this SPListItem item, SPPrincipal principal, SPRoleType roleType)
{
 if (item != null)
 {
  SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
  SetPermissions(item, principal, roleDefinition);
 }
}

public static void SetPermissions(this SPListItem item, SPUser user, SPRoleDefinition roleDefinition)
{
 if (item != null)
 {
  SetPermissions(item, (SPPrincipal)user, roleDefinition);
 }
}

public static void SetPermissions(this SPListItem item, SPPrincipal principal, SPRoleDefinition roleDefinition)
{
 if (item != null)
 {
  SPRoleAssignment roleAssignment = new SPRoleAssignment(principal);

  roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
  item.RoleAssignments.Add(roleAssignment);
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Deleting all user Permissions from an item&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static void RemovePermissions(this SPListItem item, SPUser user)
{
 if (item != null)
 {
  RemovePermissions(item, user as SPPrincipal);
 }
}

public static void RemovePermissions(this SPListItem item, SPPrincipal principal)
{
 if (item != null)
 {
  item.RoleAssignments.Remove(principal);
  item.SystemUpdate();
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Removing specific roles from an item&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static void RemovePermissionsSpecificRole(this SPListItem item, SPPrincipal principal, SPRoleDefinition roleDefinition)
{
 if (item != null)
 {
  SPRoleAssignment roleAssignment = item.RoleAssignments.GetAssignmentByPrincipal(principal);
  if (roleAssignment != null)
  {
   if (roleAssignment.RoleDefinitionBindings.Contains(roleDefinition))
   {
    roleAssignment.RoleDefinitionBindings.Remove(roleDefinition);
    roleAssignment.Update();
   }
  }
 }
}

public static void RemovePermissionsSpecificRole(this SPListItem item, SPPrincipal principal, SPRoleType roleType)
{
 if (item != null)
 {
  SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
  RemovePermissionsSpecificRole(item, principal, roleDefinition);
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Updating or Modifying Permissions on an item&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;public static void ChangePermissions(this SPListItem item, SPPrincipal principal, SPRoleType roleType)
{
 if (item != null)
 {
  SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
  ChangePermissions(item, principal, roleDefinition);
 }
}

public static void ChangePermissions(this SPListItem item, SPPrincipal principal, SPRoleDefinition roleDefinition)
{
 SPRoleAssignment roleAssignment = item.RoleAssignments.GetAssignmentByPrincipal(principal);
 if (roleAssignment != null)
 {
  roleAssignment.RoleDefinitionBindings.RemoveAll();
  roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
  roleAssignment.Update();
 }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1047169079947080653?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1047169079947080653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/10/programmatically-add-delete-modify-item.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1047169079947080653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1047169079947080653'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/10/programmatically-add-delete-modify-item.html' title='programmatically add delete modify item permissions'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-6361000645954604536</id><published>2010-09-28T14:49:00.000-07:00</published><updated>2010-09-28T14:49:24.625-07:00</updated><title type='text'>Get all columns used to display search results</title><content type='html'>&lt;pre class="brush:xml"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;
&amp;lt;xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/&amp;gt;
&amp;lt;xsl:template match="/"&amp;gt;
&amp;lt;textarea rows="20" cols="100"&amp;gt;
 &amp;lt;xsl:copy-of select="*"/&amp;gt;
&amp;lt;/textarea&amp;gt;
&amp;lt;/xsl:template&amp;gt;
&amp;lt;/xsl:stylesheet&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-6361000645954604536?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/6361000645954604536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/09/get-all-columns-used-to-display-search.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6361000645954604536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6361000645954604536'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/09/get-all-columns-used-to-display-search.html' title='Get all columns used to display search results'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-7666089918727880112</id><published>2010-09-13T19:03:00.000-07:00</published><updated>2011-01-06T06:24:44.895-08:00</updated><title type='text'>Programmatically hide show the status bar</title><content type='html'>&lt;h2&gt;Customizing status bar programmatically using Server code&lt;/h2&gt;&lt;br /&gt;
&lt;h3&gt;Showing persistent messages using the SharePoint 2010 Status bar&lt;/h3&gt;&lt;h4&gt;&lt;u&gt;&lt;i&gt;Method 1 - registering client script&lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;private string PageStatusHtml = "This is a custom message. Click &lt;a href='#'&gt;here&lt;/a&gt; for more details.";

protected override void OnPreRender(EventArgs e)
{
 base.OnPreRender(e);
 ScriptLink.RegisterScriptAfterUI(this.Page, "core.js", true, false);
 ScriptLink.RegisterScriptAfterUI(this.Page, "CUI.js", false, true);
 ScriptLink.RegisterScriptAfterUI(this.Page, "SP.js", false, true);

 this.SetStatusVisibility();
}


private void SetStatusVisibility()
{
 StringBuilder script = new StringBuilder();
 if (!string.IsNullOrEmpty(this.PageStatusHtml))
 {
  script.Append("&lt;script type=\"text/javascript\"&gt;");
  script.Append("var statusId = addStatus('', '" + SPHttpUtility.EcmaScriptStringLiteralEncode(this.PageStatusHtml.Trim()) + "', false); ");
  script.Append("setStatusPriColor(statusId, 'red');");
  script.Append("&lt;/script&gt;");
 }
 this.Page.ClientScript.RegisterStartupScript(typeof(SPRibbon), "permstatus", script.ToString(), false);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;u&gt;&lt;i&gt;Method 2 - using SPPageStatusSetter &lt;/i&gt;&lt;/u&gt;&lt;/h4&gt;&lt;pre class="brush: csharp"&gt;private string PageStatusHtml = "This is a custom message. Click &lt;a href='#'&gt;here&lt;/a&gt; for more details.";

protected override void CreateChildControls()
{
 base.CreateChildControls();

 status = new SPPageStatusSetter();
 status.AddStatus("My Message", PageStatusHtml, SPPageStatusColor.Blue);
 this.Controls.Add(status);
}

protected override void RenderContents(HtmlTextWriter writer)
{
 status.RenderControl(writer);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;Hiding a SharePoint 2010 Status bar&lt;/h3&gt;&lt;pre class="brush: csharp"&gt;public void HideStatusBar()
{
   string script = "document.onreadystatechange=fnRemoveAllStatus; function fnRemoveAllStatus(){removeAllStatus(true)};";
   this.Page.ClientScript.RegisterClientScriptBlock(typeof(HideTheRibbon), "statusBarRemover", script, true);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Customizing status bar programatically using client side code&lt;/h2&gt;&lt;pre class="brush: javascript"&gt;&amp;lt;script type="text/javascript"&amp;gt;
function CreateStatus()
{
this.statuthis.statusID =  SP.UI.Status.addStatus(SP.Utilities.HttpUtility.htmlEncode("My Status Bar Title"), "This is a new message", true);
}

function AppendStatusMethod()
{
SP.UI.Status.appendStatus(this.statusID, "Appended:", " This is appended text ");
}

function UpdateStatus()
{
SP.UI.Status.updateStatus(this.statusID, "Updated: HTML updated for " + this.statusID + " using updateStatus");
}

function RemoveStatus()
{
SP.UI.Status.removeStatus(this.statusID);
}

function RemoveAllStatus()
{
SP.UI.Status.removeAllStatus(true);
}

&amp;lt;/script&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
ref :&lt;br /&gt;
http://www.learningsharepoint.com/2010/07/20/customizing-the-status-bar-in-sharepoint-2010/&lt;br /&gt;
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.sppagestatussetter_methods.aspx&lt;br /&gt;
http://www.sharepoint4arabs.com/AymanElHattab/Lists/Posts/Post.aspx?List=0b2c413e%2De6fb%2D4c60%2Da12f%2D9ae9bdbd48c8&amp;ID=181&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-7666089918727880112?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/7666089918727880112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/09/programatically-hide-show-status-bar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7666089918727880112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7666089918727880112'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/09/programatically-hide-show-status-bar.html' title='Programmatically hide show the status bar'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-8187928383383929900</id><published>2010-07-13T06:03:00.000-07:00</published><updated>2010-07-13T06:28:17.716-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Ribbon'/><title type='text'>Ribbon Customization : Ribbon button location and their IDs</title><content type='html'>&lt;h2&gt;SharePoint 2010 Ribbon Customization : Ribbon button location and their IDs&lt;/h2&gt;&lt;br /&gt;
&lt;h3&gt;Pre-Requisite : &lt;a href="http://howtosharepoint.blogspot.com/2010/06/ribbon-basics.html"&gt;Ribbon Basics&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Document Library ( Manage )&lt;/h3&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TDxox9OWphI/AAAAAAAAAfU/Oa57UmMLH1k/s1600/Doc.Manage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" rw="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TDxox9OWphI/AAAAAAAAAfU/Oa57UmMLH1k/s640/Doc.Manage.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class="brush:xml"&gt;&amp;lt;CommandUIDefinition Location="Ribbon.Documents.Manage.Controls._children"&amp;gt;
  &amp;lt;Button
 Id="ManoInc.Ribbon.Documents.Manage.SetDocFinal"
 Sequence="40"
 Command="ManoInc.Ribbon.Documents.Manage.SetDocFinal.cmdSetDocFinal"
 Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-144" Image16by16Left="0"
 Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-128" Image32by32Left="-256"
 LabelText="Finalize Document"
 ToolTipTitle="Finalize Document"
 ToolTipDescription="Finalize Document"
 TemplateAlias="o1"/&amp;gt;
&amp;lt;/CommandUIDefinition&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Manage DocumentSet&lt;/h3&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TDxo4phHPII/AAAAAAAAAfc/6QuhZXhZF0U/s1600/DocSet.Manage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" rw="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TDxo4phHPII/AAAAAAAAAfc/6QuhZXhZF0U/s640/DocSet.Manage.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class="brush:xml"&gt;&amp;lt;CommandUIDefinition  Location="Ribbon.ManageDocumentSet.MDS.Manage.Controls._children"&amp;gt;
  &amp;lt;Button
 Id="ManoInc.Ribbon.ManageDocumentSet.MDS.Manage.SetDocSetFinal"
 Sequence="20"
 Command="ManoInc.Ribbon.ManageDocumentSet.MDS.Manage.cmdSetDocSetFinal"
 Alt="Finalize DocumentSet"
 Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-144" Image16by16Left="0"
 Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-128" Image32by32Left="-256"
 LabelText="Finalize DocumentSet"
 ToolTipTitle="Finalize DocumentSet"
 ToolTipDescription="Finalize DocumentSet"
 TemplateAlias="o1" /&amp;gt;
&amp;lt;/CommandUIDefinition&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-8187928383383929900?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/8187928383383929900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/07/ribbon-customization-ribbon-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/8187928383383929900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/8187928383383929900'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/07/ribbon-customization-ribbon-button.html' title='Ribbon Customization : Ribbon button location and their IDs'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_g-JN_WB_wo4/TDxox9OWphI/AAAAAAAAAfU/Oa57UmMLH1k/s72-c/Doc.Manage.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-9079473346593113375</id><published>2010-06-20T20:57:00.000-07:00</published><updated>2010-06-20T21:07:27.723-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Client Object Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ECMAscript'/><title type='text'>how to get selected metadata for listitem using ECMAScript Client Object Model</title><content type='html'>&lt;h3&gt;SharepPoint 2010 ECMAScript Client Object Model : how to get selected metadata for listitem&lt;/h3&gt;&lt;br /&gt;
Often, it  is requried to retrieve information relevant to what we need, especially in the case of client side programming to reduce bandwidth and improve response time. Following are sample code to fetch only selective metadata for a listitem &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;var context = SP.ClientContext.get_current();
this.web = context.get_web();
var listId = SP.ListOperation.Selection.getSelectedList();
var list = this.web.get_lists().getById(listId);
var items = SP.ListOperation.Selection.getSelectedItems(context);
var itemId = items[0];
this.listItem = list.getItemById(itemId.id);

context.load(this.listItem, '_dlc_DocIdUrl', 'FileLeafRef');
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;var context = SP.ClientContext.get_current();
this.web = context.get_web();
this.listCollection = this.web.get_lists();

context.load(this.listCollection, 'Include(Title, Id)');
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-9079473346593113375?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/9079473346593113375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/how-to-get-selected-metadata-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9079473346593113375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9079473346593113375'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/how-to-get-selected-metadata-for.html' title='how to get selected metadata for listitem using ECMAScript Client Object Model'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2126055839613834811</id><published>2010-06-18T13:59:00.000-07:00</published><updated>2010-07-13T17:20:47.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Client Object Model'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Ribbon'/><title type='text'>Ribbon customization : Adding functionality to Ribbon Button</title><content type='html'>&lt;h3&gt;SharePoint 2010 Ribbon customization : Add functionality to the button &lt;/h3&gt;&lt;br /&gt;
&lt;b&gt;pre-requisite&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://howtosharepoint.blogspot.com/2010/06/ribbon-basics.html"&gt;Ribbon Basics&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Writing the script in scriptblock&lt;/b&gt;&lt;br /&gt;
In the basics you saw the command action of the button firing a javascript that was inline. Supposingly if you wanted to call a block of JS code .. you cannot write it inline. For that you will have to use a ScriptBlock attribute of the CustomAction node like the following..&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBvd-FUbTbI/AAAAAAAAAeI/ouex46MDfzM/s1600/ScriptBloack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" qu="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBvd-FUbTbI/AAAAAAAAAeI/ouex46MDfzM/s640/ScriptBloack.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Writing the script in an external js file&lt;/b&gt;&lt;br /&gt;
The same javascript function can be written in an external *.js file. To achieve this, right-click on the project and Add the layouts mapped folder. In the subfolder under the layouts folder, add a js file.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/TBviFWVk5cI/AAAAAAAAAeQ/0zE5-F0709Q/s1600/Layouts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" qu="true" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/TBviFWVk5cI/AAAAAAAAAeQ/0zE5-F0709Q/s320/Layouts.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Next, modify the elements.xml as below&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBviVWz6BWI/AAAAAAAAAeY/bNv5DCeK6I4/s1600/externalJS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" qu="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBviVWz6BWI/AAAAAAAAAeY/bNv5DCeK6I4/s640/externalJS.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Enabling EcmaScript(JavaScript) IntelliSense in VS2010&lt;/b&gt;&lt;br /&gt;
To add intellisense to SP COM, add the following lines at the top of the js file..&lt;br /&gt;
&lt;pre class="brush:plain"&gt;/// &amp;lt;reference name="MicrosoftAjax.js" /&amp;gt;
/// &amp;lt;reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" /&amp;gt;
/// &amp;lt;reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" /&amp;gt;
&lt;/pre&gt;After adding the above lines, you will notice that the intellisense for the sharepoint client object model is active. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using Client Object Model to dispplay SharePoint Status bar&lt;/b&gt;&lt;br /&gt;
Lets modify the HelloWorld function to show the message in the status bar of SharePoint. Below is the modified javascript..&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;/// &amp;lt;reference name="MicrosoftAjax.js" /&amp;gt;
/// &amp;lt;reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" /&amp;gt;
/// &amp;lt;reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" /&amp;gt;

function HelloWorld() {
    this.statusID = SP.UI.Status.addStatus("Hello World", 
"A message from Mano &amp;lt;a href='#' onclick='javascript:closeStatus();return false;'&amp;gt;Close&amp;lt;/a&amp;gt;.", true);
    SP.UI.Status.setStatusPriColor(this.statusID, "green");
}

function closeStatus() {
    SP.UI.Status.removeStatus(this.statusID);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Using Client Object Model to display current selected listItems and the list id&lt;/b&gt;&lt;br /&gt;
Now that we are able to access the SP namespace, we should be able to access the SharePoint entities like the site and the web for our use. In the code snippet we will be looking at how to get the selected items and  the list Id from where these items are displayed.&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;function ShowListInformation() {
    // get all selected items
    var items = SP.ListOperation.Selection.getSelectedItems();
    var itemCount = CountDictionary(items);
    
    // get the current list
    var listID = SP.ListOperation.Selection.getSelectedList();

    // Remove all previous status
    SP.UI.Status.removeAllStatus(false);

    this.statusID = SP.UI.Status.addStatus("Selection Information", "Item Count : " 
+ itemCount.toString() + " List ID : " + listID.toString(), true);
    SP.UI.Status.setStatusPriColor(this.statusID, "blue");
}
&lt;/pre&gt;&lt;i&gt;Note: Make sure that you change the CommandAction attribute in the elements.xml with the new function&lt;/i&gt;&lt;br /&gt;
Why is the above code important ?&lt;br /&gt;
This code opens a whole new arena for us to play with , including to enable the button based on a condition, which we will see as we dwell deeper.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tip: Make sure that the latest code is used to render the button&lt;/b&gt;&lt;br /&gt;
1. Make sure the app pool is recycled&lt;br /&gt;
2. Make sure that the browser cache is cleared&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2126055839613834811?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2126055839613834811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/ribbon-adding-functionality-to-ribbon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2126055839613834811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2126055839613834811'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/ribbon-adding-functionality-to-ribbon.html' title='Ribbon customization : Adding functionality to Ribbon Button'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/TBvd-FUbTbI/AAAAAAAAAeI/ouex46MDfzM/s72-c/ScriptBloack.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2995517266455886146</id><published>2010-06-18T10:41:00.000-07:00</published><updated>2010-06-20T10:31:52.677-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Ribbon'/><title type='text'>Ribbon customization : Basics</title><content type='html'>&lt;h2 style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;SharePoint 2010 Ribbon customization : Basics&lt;/h2&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;This article is the first of a series of articles planned to address a real-world ribbon customization requirement. In this article, we will look at the basic architecture of the Ribbon in Sharepoint 2010.&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;To see ribbon’s internal you need to look into CMDUI.xml file, which you can find at location 14\template\global\xml\cmdui.xml.&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;But it is too confusing right now.. so the best way to look at it is look at the hierarcy of Ribbon. It starts with the base Ribbon implementation which is something like this&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;Ribbon &amp;gt; Tabs &amp;gt; Groups &amp;gt; Controls&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;A ribbon can have mutiple tabs, each tab mutiple groups and each group multiple controls. These controls can be a Button, CheckBox, Dropdown etc. The complete list is &lt;a href="http://msdn.microsoft.com/en-us/library/ff458480.aspx"&gt;here ..&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;We will start with a hello world example and then build functionlity. We are not going to create a custom tab or group, but just add a button first to an existing location. It is better to understand this way.&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;Below is a snapshot of the xml that will add a new button..&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBuzqXiaU2I/AAAAAAAAAdY/mfLe7XR0sUU/s1600/NewButtonXmlSnapShot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="345" qu="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBuzqXiaU2I/AAAAAAAAAdY/mfLe7XR0sUU/s640/NewButtonXmlSnapShot.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;strong&gt;Description of some of the elements in the screenshot above..&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;this will determine where the new item to be created will reside.. whether is the ribbon or the ECB ( thats the contextual dropdown on the list item) or the Site Actions Menu or on the Backup &amp;amp; Restore page in central admin or whereever; this will decide where it is to be created. Here is a &lt;a href="http://msdn.microsoft.com/en-us/library/bb802730.aspx"&gt;list of all possible locations&lt;/a&gt; . The ones we are interested are.. &lt;br /&gt;
&lt;ul&gt;&lt;li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;CommandUI.Ribbon.ListView&lt;/li&gt;
&lt;li&gt;CommandUI.Ribbon.NewForm&lt;/li&gt;
&lt;li&gt;CommandUI.Ribbon.EditForm&lt;/li&gt;
&lt;li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;CommandUI.Ribbon.DisplayForm&lt;/li&gt;
&lt;li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;CommandUI.Ribbon&lt;/li&gt;
&lt;/ul&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;if you dont know where exactly you want it to be place except for the fact that it should be a ribbon.. then select 'CommandUI.Ribbon'&lt;/div&gt;&lt;/li&gt;
&lt;li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;This is the most important entry you will be making. This will determine where in the ribbon will it show up. As already mentioned, we just want to add a button. But as per the hierarchy, the button is a control and its parent is a group. So you will have to find the appropriate group name add your button.. but how ? &lt;br /&gt;
&lt;br /&gt;
As an example, we want the button available for a document, under the Manage group &lt;br /&gt;
&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBuzzfpG7BI/AAAAAAAAAdg/WoLKReeMvnI/s1600/RibbonLocation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" qu="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBuzzfpG7BI/AAAAAAAAAdg/WoLKReeMvnI/s640/RibbonLocation.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;/div&gt;Here is a &lt;a href="http://msdn.microsoft.com/en-us/library/ee537543.aspx"&gt;list of all possible locations &lt;/a&gt;you can choose from. It lists the groups and the controls that are in each group. You are interested in the group, so search for a group that matches close to the group name "Manage" and also should be present in a tab named "Document". Here you go the group name location "Ribbon.Documents.Manage" &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, since you got your groupname.. you have to specify that you are going to add a child control.. the syntax is "Controls._children". Hence your complete location is "Ribbon.Documents.Manage.Controls._children"&lt;br /&gt;
&lt;br /&gt;
The sequence also place a role where it is placed within the group.&lt;/li&gt;
&lt;li&gt;This is just a name to the new control, in this case a button. Typically I take the group name "Ribbon.Documents.Manage" and prefix this with the company name I am developing this for "ManoInc" and postfix with a unique button name "HelloWorld" . &lt;/li&gt;
&lt;li&gt;This is the command that is execute when the button is clicked. Again, you can be innovative in giving a name. Make sure you use the same name defining the command the "CommandUIHandler section&lt;/li&gt;
&lt;li&gt;This is the image that is rendered for the button that you have defined. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that I have used the OOTB image in this case that is "formatmap32x32.png". This is a special image where it a collection of images in one image. when you use this image or any other image where there is collection of image in a single file, you have to use the Image32by32Top and the Left attributes to render properly. &lt;br /&gt;
&lt;br /&gt;
Basically, A negative integer representing an offset for the left edge of the image. Use this attribute when the Image32by32 attribute points to an image file that contains images for many icons. &lt;br /&gt;
&lt;br /&gt;
The value of the Image32by32Left attribute is used to set the CSS left attribute for the inline style of an HTML img tag. For example, setting the Image32by32Left attribute to "-160" and the Image32by32Top attribute to "-448" results in an inline style that is similar to the one in the following HTML markup:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: plain"&gt;&lt;img src="http://www.blogger.com/_layouts/1033/images/formatmap32x32.png" style="left: -160px; position: absolute; top: -448px;" /&gt;
&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/TBuz5QC46MI/AAAAAAAAAdo/DA7rMhblSC0/s1600/paint.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" qu="true" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/TBuz5QC46MI/AAAAAAAAAdo/DA7rMhblSC0/s400/paint.png" width="316" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
A simple way to calculate this co-ordinates is opening the image in MS Paint and place you cursor on the corner of the image you want. If you look at the bottom left of the MSPaint, you will see the co-ordinates e.g 259, 127px. This value is the left and the top co-ordinate of the image. All images in this file are 32x32px. if you caluclate a multiple of 32, the nearest value of 259 is 256 and the nearest to 127 is 128. Here you have it, the Image32by32Left = 256 and Image32by32Top = 128&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt; Build your 'Hello World' Ribbon &lt;/strong&gt;&lt;br /&gt;
Now that you know the basics, lets build the feature and deploy and test it..&lt;br /&gt;
1. Create a new sharepoint project in VS 2010. Make sure you specify the proper Url for this to deploy and make note of this url.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TBu1pqQI78I/AAAAAAAAAdw/1eC2julKgwo/s1600/Prjcreate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="508" qu="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TBu1pqQI78I/AAAAAAAAAdw/1eC2julKgwo/s640/Prjcreate.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;2. Add a new item of the type "Empty Element" to the project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBu1v6wEc1I/AAAAAAAAAd4/trU4Kr_PS_A/s1600/newItem.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="444" qu="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TBu1v6wEc1I/AAAAAAAAAd4/trU4Kr_PS_A/s640/newItem.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;3. Add the following xml in the elements file&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;
  &amp;lt;CustomAction Id="DocFinalRibbon" Location="CommandUI.Ribbon"&amp;gt;
    &amp;lt;CommandUIExtension&amp;gt;
      &amp;lt;CommandUIDefinitions&amp;gt;
        &amp;lt;CommandUIDefinition Location="Ribbon.Documents.Manage.Controls._children"&amp;gt;
          &amp;lt;Button
            Id="ManoInc.Ribbon.Documents.Manage.HelloWorld"
            Sequence="40"
            Command="ManoInc.Ribbon.Documents.Manage.HelloWorld.cmdSayHelloWorld"
            Image16by16="/_layouts/1033/images/formatmap16x16.png" Image16by16Top="-144" Image16by16Left="0"
            Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Top="-128" Image32by32Left="-256"
            LabelText="Hello World"
            ToolTipTitle="Click button to prompt 'Hello World'"
            ToolTipDescription="Once you click this button, you will get a hello world dialog box "
            TemplateAlias="o1"/&amp;gt;
        &amp;lt;/CommandUIDefinition&amp;gt;
      &amp;lt;/CommandUIDefinitions&amp;gt;
      &amp;lt;CommandUIHandlers&amp;gt;
        &amp;lt;CommandUIHandler
          Command="ManoInc.Ribbon.Documents.Manage.HelloWorld.cmdSayHelloWorld"
          CommandAction="javascript:alert('Hi Mano');" /&amp;gt;
      &amp;lt;/CommandUIHandlers&amp;gt;
    &amp;lt;/CommandUIExtension&amp;gt;
  &amp;lt;/CustomAction&amp;gt;
&amp;lt;/Elements&amp;gt;
&lt;/pre&gt;4. Hit F5 to deploy. Navigate to a document libary, click on the document tab and there you have it, your Ribbon button.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TBu2M5IPx3I/AAAAAAAAAeA/C5CulGfwg6w/s1600/RibbonItemDisplayed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" qu="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TBu2M5IPx3I/AAAAAAAAAeA/C5CulGfwg6w/s640/RibbonItemDisplayed.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2995517266455886146?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2995517266455886146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/ribbon-basics.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2995517266455886146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2995517266455886146'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/ribbon-basics.html' title='Ribbon customization : Basics'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/TBuzqXiaU2I/AAAAAAAAAdY/mfLe7XR0sUU/s72-c/NewButtonXmlSnapShot.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1615412536866695730</id><published>2010-06-18T08:42:00.000-07:00</published><updated>2010-07-01T06:19:15.360-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Ribbon'/><title type='text'>Ribbon customization : Hide Ribbon Programatically</title><content type='html'>&lt;h2&gt;Ribbon customization : how to hide Ribbon programatically&lt;/h2&gt;&lt;br /&gt;
&lt;h3&gt;programatically hide a Ribbon &lt;/h3&gt;&lt;pre class="brush: csharp"&gt;public void HideRibbon()
{
  SPRibbon current = SPRibbon.GetCurrent(this.Page);

  if (current != null &amp;&amp; !this.Page.Request.IsAuthenticated)
  {
    current.CommandUIVisible = false;
  }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;programatically hide a single ribbon button &lt;/h3&gt;&lt;pre class="brush: csharp"&gt;public void HideRibbonItem()
{
 //if this is a System.Web.UI.Page
 SPRibbon ribbon = SPRibbon.GetCurrent(this);
 ribbon.TrimById("Ribbon.ListItem.New.NewFolder");
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;programatically hide the status bar &lt;/h3&gt;&lt;pre class="brush: csharp"&gt;public void HideStatusBar()
{
   string script = "document.onreadystatechange=fnRemoveAllStatus; function fnRemoveAllStatus(){removeAllStatus(true)};";
   this.Page.ClientScript.RegisterClientScriptBlock(typeof(HideTheRibbon), "statusBarRemover", script, true);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;programatically hide the SiteActions Menu &lt;/h3&gt;&lt;pre class="brush: csharp"&gt;public void HideSiteActionsMenu()
{
  SiteActions actions = SiteActions.GetCurrent(this.Page);

  if (actions != null &amp;amp;&amp;amp; !this.Page.Request.IsAuthenticated)
  {
       actions.Visible = false;
  }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref: http://www.elumenotion.com/Blog/Lists/Posts/Post.aspx?ID=106&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1615412536866695730?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1615412536866695730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/hide-ribbon-programatically.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1615412536866695730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1615412536866695730'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/06/hide-ribbon-programatically.html' title='Ribbon customization : Hide Ribbon Programatically'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1923783274401045505</id><published>2010-05-28T13:50:00.000-07:00</published><updated>2010-07-13T16:49:21.519-07:00</updated><title type='text'>Associate workflow to a custom contentType</title><content type='html'>&lt;h2&gt;How to associate a workflow to a custom contentType&lt;/h2&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to attach your custom workflow to a content type (single, multiple or all of the content types.. below are samples..&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Associate workflow with a single contentType&lt;/b&gt;&lt;br /&gt;
Notice the highlighted portion which is a ';' delimited two part entry.&lt;br /&gt;
First is the type of category and second is the id of the entity. In this example, the category is content type and I have specified the id of the content type that should be available for this workflow.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brushxml"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;
  &amp;lt;Workflow
     Name="WFName"
     Description="This workflow will .."
     Id="532c0a2d-fa10-4dad-80a4-1069b2bd8e27"
     CodeBesideClass="Demo.Workflow.Workflow1"
     CodeBesideAssembly="$assemblyname$"
      InstantiationUrl="_LAYOUTS/DEMO/DemoForms/form0_Init.aspx"&amp;gt;
    &amp;lt;Categories/&amp;gt;
    &amp;lt;MetaData&amp;gt;
&lt;b&gt;      &amp;lt;AssociationCategories&amp;gt;&lt;span style="color: red;"&gt;ContentType;0x010100a945f312c7bd4a589d1489ca8307f24d&lt;/span&gt;&amp;lt;/AssociationCategories&amp;gt;&lt;/b&gt;
      &amp;lt;StatusPageUrl&amp;gt;_layouts/WrkStat.aspx&amp;lt;/StatusPageUrl&amp;gt;
    &amp;lt;/MetaData&amp;gt;
  &amp;lt;/Workflow&amp;gt;
&amp;lt;/Elements&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Associate workflow with a multiple contentType&lt;/b&gt;&lt;br /&gt;
notice that every set of category is seperated by the delimiter ';#'&lt;br /&gt;
&lt;pre class="brushxml"&gt;&amp;lt;MetaData&amp;gt;
  &amp;lt;AssociationCategories&amp;gt;ContentType;0x010100a945f312c7bd4a589d1489ca8307f24d&lt;strong&gt;&lt;span style="color: red;"&gt;;#&lt;/span&gt;&lt;/strong&gt;ContentType;0x0101009a30bd7a9c18447e9b806af9c0931b9c&amp;lt;/AssociationCategories&amp;gt;
&amp;lt;/MetaData&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Associate workflow with a all contentTypes&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brushxml"&gt;&amp;lt;MetaData&amp;gt;
  &amp;lt;AssociationCategories&amp;gt;&lt;span style="color: red;"&gt;&lt;strong&gt;ContentType&lt;/strong&gt;&lt;/span&gt;&amp;lt;/AssociationCategories&amp;gt;
&amp;lt;/MetaData&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Associate workflow with a all contentTypes and Lists&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brushxml"&gt;&amp;lt;MetaData&amp;gt;
  &amp;lt;AssociationCategories&amp;gt;&lt;strong&gt;&lt;span style="color: red;"&gt;ContentType;#List&lt;/span&gt;&lt;/strong&gt;&amp;lt;/AssociationCategories&amp;gt;
&amp;lt;/MetaData&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/aa543430(v=office.14).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa543430(v=office.14).aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1923783274401045505?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1923783274401045505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/custom-workflow-not-available-to-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1923783274401045505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1923783274401045505'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/custom-workflow-not-available-to-be.html' title='Associate workflow to a custom contentType'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-6267005942254855278</id><published>2010-05-28T06:42:00.000-07:00</published><updated>2010-11-18T20:13:31.698-08:00</updated><title type='text'>programmatically update a file in document library</title><content type='html'>Wondering how to how to update file in document library? Well, if you want to programmatically update a document and save it back to the document library.. here is the code for that &lt;br /&gt;
&lt;pre class="brush: csharp"&gt;public void UpdateDocument()
{
 System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();

 SPSecurity.RunWithElevatedPrivileges(delegate()
 {
  using (SPSite siteColl = new SPSite("http://localhost:8080/"))
  {
   using (SPWeb web = siteColl.OpenWeb())
   {
    try
    {   
     SPFile spfile = web.GetFile("http://localhost:8080/Lists/DemoLib/abc.txt");
     if (spfile.Exists)
     {
      byte[] byteArrayFileContentsBefore = spfile.OpenBinary();

      if (byteArrayFileContentsBefore.Length &gt; 0)
      {
       string strFileContentsBefore = enc.GetString(byteArrayFileContentsBefore); //convert byte array to string.
       string newStr = strFileContentsBefore + "This is the new text added";
       byte[] byteArrayFileContentsAfter = null;
       if (!newStr.Equals(""))
       {
        byteArrayFileContentsAfter = enc.GetBytes(newStr);
        spfile.SaveBinary(byteArrayFileContentsAfter); //save to the file.
       }
      }
     }
    }
    catch (Exception e){}
   } 
  }
 });
}
&lt;/pre&gt;&lt;br /&gt;
SPFile has a CopyFile method which can copy the file to a new location. But if there was an existing file on the new location, you can set the overwrite parameter to true to overwrite it. Here is a problem, supposingly there was a workflow already on the file in the new location... when you use CopyFile.. the workflow is lost.. basically it is not an update of the file.. it is infact a delete and re-adding of the file. The following code will overcome this problem&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;private void UpdateDocumentForERB_ExecuteCode(SPWeb web, string originalFileUrl, string targetFileUrl)
{
 SPSecurity.RunWithElevatedPrivileges(delegate()
 {
  SPFile OriFile = web.GetFile(originalFileUrl);
  SPFile TarFile = web.GetFile(targetFileUrl);

  byte[] byteArrayOriFile = OriFile.OpenBinary();

  TarFile.SaveBinary(byteArrayOriFile);

 });

}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-6267005942254855278?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/6267005942254855278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/programmatically-edit-and-save-file.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6267005942254855278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/6267005942254855278'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/programmatically-edit-and-save-file.html' title='programmatically update a file in document library'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3324239870487965724</id><published>2010-05-27T13:16:00.000-07:00</published><updated>2010-05-27T13:33:21.527-07:00</updated><title type='text'>SharePoint workflow delay activity not working ( firing )</title><content type='html'>I knew there were issues with the delay activity in WWF 3.0 ( MOSS ) and there were hotfixes to resolve that issue. I didnt expect the same to happen in Sharepoint 2010 ( .Net 3.5 WWF). But when I used it in my state machine workflow.. to my surprise it didnt work.&lt;br /&gt;
&lt;br /&gt;
Finally, I got it working after setting the propertvalue 'job-workflow'&lt;br /&gt;
&lt;br /&gt;
To check if the property is set ( most likely it is not set )&lt;br /&gt;
&lt;pre class='brush: plain'&gt;stsadm -o getproperty -pn job-workflow -url http://sp2010vmc002:1000
&lt;/pre&gt;&lt;br /&gt;
if you get &amp;lt;Property Exist="No" /&amp;gt; then set it by the following&lt;br /&gt;
&lt;pre class='brush: plain'&gt;stsadm -o setproperty -pn job-workflow -pv "Every 5 minutes between 0 and 59" -url http://sp2010vmc002:1000
&lt;/pre&gt;&lt;br /&gt;
Finally, do a iisreset and restart the Sharepoint 2010 Timer service.&lt;br /&gt;
&lt;br /&gt;
Ref: &lt;br /&gt;
&lt;a href="http://technet.microsoft.com/en-us/library/cc424970(office.12).aspx"&gt;http://technet.microsoft.com/en-us/library/cc424970(office.12).aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/2390dcee-d2f3-4a55-a024-6ad14913568e"&gt;http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/2390dcee-d2f3-4a55-a024-6ad14913568e&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3324239870487965724?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3324239870487965724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/sharepoint-workflow-delay-activity-not.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3324239870487965724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3324239870487965724'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/sharepoint-workflow-delay-activity-not.html' title='SharePoint workflow delay activity not working ( firing )'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-5058041059262317205</id><published>2010-05-13T12:18:00.000-07:00</published><updated>2010-05-13T12:32:55.318-07:00</updated><title type='text'>programmatically add "link to a document" item in a Document Library</title><content type='html'>Recently, I was working on a requirement where link to document had to be created in different document libraries. To my surprise, there is no direct way of creating a link to a document.&lt;br /&gt;
&lt;br /&gt;
Link to a document is a *.aspx file with a redirection script within the page. OOTB, this page is created via a template file &lt;br /&gt;
&lt;br /&gt;
I wanted a solution where I didnt have to read some external source to generate my aspx file.&lt;br /&gt;
&lt;br /&gt;
Here is my solution&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public static void CreateDocumentLink(SPList list, string documentName, string documentUrl, SPFolder Folder)
{
    if (list is SPDocumentLibrary)
    {
        SPDocumentLibrary docLib = (SPDocumentLibrary)list;
        if (docLib.ContentTypesEnabled)
        {
            SPContentType myCType = list.ContentTypes["Link to a Document"];
            if (myCType != null)
            {

                //replace string template with values
                string redirectAspx = RedirectAspxPage();
                redirectAspx.Replace("{0}", documentUrl);

                //should change the name of the .aspx file per item
                SPFile file = Folder.Files.Add(documentName + ".aspx", UTF8Encoding.UTF8.GetBytes(redirectAspx));

                //set list item properties
                SPListItem item = file.Item;


                item["ContentTypeId"] = myCType.Id;
                item.Update();

                if (item["ContentType"].ToString() == "Link to a Document")
                {
                    SPFieldUrlValue fieldUrl = new SPFieldUrlValue() { Description = documentName, Url = documentUrl };

                    item["URL"] = fieldUrl;
                    item.Update();
                }
            }
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public static string RedirectAspxPage()
{
    StringBuilder builder = new StringBuilder();
    builder.Append("&amp;lt;%@ Assembly Name='Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' %&amp;gt;");
    builder.Append("&amp;lt;%@ Register TagPrefix='SharePoint' Namespace='Microsoft.SharePoint.WebControls' Assembly='Microsoft.SharePoint' %&amp;gt;");
    builder.Append("&amp;lt;%@ Import Namespace='System.IO' %&amp;gt;");
    builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint' %&amp;gt;");
    builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint.Utilities' %&amp;gt;");
    builder.Append("&amp;lt;%@ Import Namespace='Microsoft.SharePoint.WebControls' %&amp;gt;");
    builder.Append("&amp;lt;html xmlns:mso=\"urn:schemas-microsoft-com:office:office\" xmlns:msdt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"&amp;gt;");
    builder.Append("&amp;lt;head&amp;gt;");
    builder.Append("&amp;lt;meta name=\"WebPartPageExpansion\" content=\"full\" /&amp;gt; &amp;lt;meta name='progid' content='SharePoint.Link' /&amp;gt; ");
    builder.Append("&amp;lt;!--[if gte mso 9]&amp;gt;&amp;lt;SharePoint:CTFieldRefs runat=server Prefix=\"mso:\" FieldList=\"FileLeafRef,URL\"&amp;gt;&amp;lt;xml&amp;gt;");
    builder.Append("&amp;lt;mso:CustomDocumentProperties&amp;gt;");
    builder.Append("&amp;lt;mso:ContentTypeId msdt:dt=\"string\"&amp;gt;0x01010A00DC3917D9FAD55147B56FF78B40FF3ABB&amp;lt;/mso:ContentTypeId&amp;gt;");
    builder.Append("&amp;lt;mso:IconOverlay msdt:dt=\"string\"&amp;gt;|docx|linkoverlay.gif&amp;lt;/mso:IconOverlay&amp;gt;");
    builder.Append("&amp;lt;mso:URL msdt:dt=\"string\"&amp;gt;{0}, {0}&amp;lt;/mso:URL&amp;gt;");
    builder.Append("&amp;lt;/mso:CustomDocumentProperties&amp;gt;");
    builder.Append("&amp;lt;/xml&amp;gt;&amp;lt;/SharePoint:CTFieldRefs&amp;gt;&amp;lt;![endif]--&amp;gt;");
    builder.Append("&amp;lt;/head&amp;gt;");
    builder.Append("&amp;lt;body&amp;gt;");
    builder.Append("&amp;lt;form id='Form1' runat='server'&amp;gt;");
    builder.Append("&amp;lt;SharePoint:UrlRedirector id='Redirector1' runat='server' /&amp;gt;");
    builder.Append("&amp;lt;/form&amp;gt;");
    builder.Append("&amp;lt;/body&amp;gt;");
    builder.Append("&amp;lt;/html&amp;gt;");
    return builder.ToString();
}

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/cliffgreen/archive/2008/06/23/creating-a-link-to-a-document-item-in-a-sharepoint-document-library-programmatically.aspx"&gt;http://blogs.msdn.com/cliffgreen/archive/2008/06/23/creating-a-link-to-a-document-item-in-a-sharepoint-document-library-programmatically.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-5058041059262317205?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/5058041059262317205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/programmatically-add-link-to-document.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5058041059262317205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5058041059262317205'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/programmatically-add-link-to-document.html' title='programmatically add &quot;link to a document&quot; item in a Document Library'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3967540305763341882</id><published>2010-05-12T06:27:00.000-07:00</published><updated>2010-05-12T06:59:56.820-07:00</updated><title type='text'>LINQ to SharePoint - code snippets</title><content type='html'>Get all Root Sub-folders from a list&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using (SPSite site = new SPSite("&lt;site&gt;"))
{
    using (SPWeb web = site.OpenWeb())
    {
        SPList lib = web.Lists["&lt;list Name&gt;"];
        var folders = from SPFolder folder in lib.RootFolder.SubFolders
                        where folder.Name != "Forms"
                        orderby folder.Name
                        select new ListItem(folder.Name, web.Url + "/" + folder.Url);

        foreach (ListItem li in folders)
        {
            Response.Write(li.Text.ToString());
        }

    }
}
&lt;/pre&gt;&lt;br /&gt;
Get all Root sub-folders from a list  and return as SPFolder&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;var folders = from SPFolder folder in lib.RootFolder.SubFolders
                where folder.Name != "Forms"
                orderby folder.Name
                select new { folder };

if (folders.Count() &gt; 0)
{
    foreach (var varFolder in folders)
    {
        if (varFolder.folder.Name.Equals("abc"))
        {
            return varFolder.folder;
            
        }
    }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3967540305763341882?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3967540305763341882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/linq-to-sharepoint-code-snippets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3967540305763341882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3967540305763341882'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/linq-to-sharepoint-code-snippets.html' title='LINQ to SharePoint - code snippets'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-682178736259829204</id><published>2010-05-04T10:07:00.000-07:00</published><updated>2010-12-01T09:49:04.813-08:00</updated><title type='text'>User Profile Synchronization Service failed to start</title><content type='html'>&lt;h3&gt;User Profile Synchronization Service failed to start.. can be fixed&lt;/h3&gt;if you want to do a User profile import in SharePoint 2010.. you should have the&lt;br /&gt;
'User Profile Synchronization Service' started. But there are many reason why this&lt;br /&gt;
service wont start. If you have waited for more than 10 mins and the status is &lt;br /&gt;
still showing 'starting' or 'stopped', then it is time to recreate the User Profile&lt;br /&gt;
Service Application. Select the service application and delete it.&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;Pre-requisites&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;The farm is running either the Standard or Enterprise version of SharePoint Server&lt;br /&gt;
2010 and you have run the farm configuration wizard. Profile Synchronization does&lt;br /&gt;
not work on a stand-alone installation for SharePoint Server 2010.&lt;/li&gt;
&lt;li&gt;If you are using Microsoft SQL Server 2008, Microsoft SQL Server 2008 with Service&lt;br /&gt;
Pack 1 (SP1) with Cumulative Update 2 (CU2) (&lt;a href="http://go.microsoft.com/fwlink/?LinkId=165962"&gt;http://go.microsoft.com/fwlink/?LinkId=165962&lt;/a&gt;)&lt;br /&gt;
is required.&lt;/li&gt;
&lt;li&gt;The WCF hotfix (&lt;a href="http://go.microsoft.com/fwlink/?LinkID=166231"&gt;KB976462&lt;/a&gt;)&lt;br /&gt;
for Windows Server 2008 R2 is installed.&lt;/li&gt;
&lt;li&gt;An instance of the User Profile Service application exists and is started. For more&lt;br /&gt;
information, see &lt;a href="http://technet.microsoft.com/en-us/library/ee721052(office.14).aspx"&gt;&lt;br /&gt;
Create, edit, or delete a User Profile service application (SharePoint Server 2010)&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h5 style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;If you have all of the above set right.. Check the following..&lt;/h5&gt;&lt;ol style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;li&gt;The service account that will be used to User Profile Syncronization (UPS) is the farm account ( the one you used while running the Sharepoint 2010 Products Configuraton Wizard). You can check the farm account by going to CA &amp;gt; Security &amp;gt; Configure Service Accounts &amp;gt; Farm Account&lt;/li&gt;
&lt;li&gt;Make sure this service account is a domain account with local administrator permissions&lt;br /&gt;
on WFE servers ( this is required only during the provisioning of UPS, later it can be removed from the Administrators group). Add the farm account to the administrators group and Re-boot&lt;br /&gt;
system ( resetting IIS and Timer service may also work.. if not you have to re-boot)&lt;/li&gt;
&lt;li&gt;The Farm account requires the log on locally right on the machine running the User Profile Synchronization (FIMSync) service. &lt;br /&gt;
Grant this right via Local Security Policy or Group Policy on that Machine.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Start &amp;gt; Run &amp;gt; secpol.msc ... [Security Settings\Local Policies\User Rights Assignment\Allow Log on Locally] item. In the Local Security Setting tab, Add User or group.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TPH11okMspI/AAAAAAAAAkU/xovHbUDo2B4/s1600/secpol.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="285" ox="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TPH11okMspI/AAAAAAAAAkU/xovHbUDo2B4/s400/secpol.png.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If you are a developer with Domain Controller on the server, or if the "Add User or Group" button is disabled in the previous step, it is probably because the Domain Controller policy takes precedence. In this case, click on Start &amp;gt; Run &amp;gt; gpmc.msc ... Domain Controllers &amp;gt; Default Domain Controller Policy .. right-click and edit. &lt;br /&gt;
Locate the [Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Allow Log on Locally] item. In the Local Security Setting tab, Add User or group.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/TPH11eVw9FI/AAAAAAAAAkQ/UaojZysWJsM/s1600/gpmc.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="307" ox="true" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/TPH11eVw9FI/AAAAAAAAAkQ/UaojZysWJsM/s640/gpmc.png.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Run gpupdate to refresh the policy change .&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Service account has full control permissions on User Profile Service application. for this goto Central Admin &amp;gt;Application Management &amp;gt;Manage Service Applications &amp;gt;Click on the bar of "User Profile Service Application " (.. dont click on the link). In the ribbon, make sure that under Administrators and Permissions Menu, the service account has full control.&lt;/li&gt;
&lt;li&gt;Goto CA &amp;gt; Application Management &amp;gt; Manage Services on Server &amp;gt; User Profile Synchronization Service &amp;gt; Click on Start.. fill in the credentials and start service&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_g-JN_WB_wo4/S-Bcz8bEo0I/AAAAAAAAAc8/X2Cs2OvA_yY/s1600/UPS_1.png" imageanchor="1" style="cssfloat: right; margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="http://2.bp.blogspot.com/_g-JN_WB_wo4/S-Bcz8bEo0I/AAAAAAAAAc8/X2Cs2OvA_yY/s640/UPS_1.png" tt="true" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;h5&gt;Once all the above is done.. you can start the service.. steps provided here &lt;a href="http://blogs.msdn.com/alimaz/archive/2009/11/09/configuring-user-profile-service-application-in-sharepoint-server-2010.aspx"&gt;&lt;br /&gt;
Configuring User Profile Service Application in SharePoint Server 2010&lt;/a&gt;&lt;/h5&gt;&lt;br /&gt;
Additionally try the following..&lt;br /&gt;
Grant the Network Service and the farm account; Read &amp; Execute / List folder contents / Read permissions to the 'C:\Program Files\Microsoft Office Servers\14.0\*' directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;Exceptions:&lt;/h5&gt;Logs might show you the following error "Exception trying to write the dbName regkey for MIIS System.Security.SecurityException: Requested registry access is not allowed". &lt;br /&gt;
This is because the service account used to start the user profile sync is not the administrator of the local system and may not have rights to modify the registry. &lt;br /&gt;
Solution is to add the user account to the administrators group and Re-boot&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UserProfileServiceUserStatisticsWebPart:LoadControl failed&lt;br /&gt;
UserProfileServiceAudienceStatisticsWebPart:LoadControl failed&lt;br /&gt;
UserProfileServiceImportStatisticsWebPart:LoadControl failed&lt;br /&gt;
&lt;br /&gt;
Exception: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.InitializeIlmClient&lt;br /&gt;
&lt;br /&gt;
Resolution : just do a IISReset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional Resources:&lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=19ccbf21-380f-44c7-82b7-a1e1d703fd31"&gt;Profile synchronization and Connection planning worksheets for SharePoint Server 2010&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/b/russmax/archive/2010/03/20/sharepoint-2010-provisioning-user-profile-synchronization.aspx"&gt;SharePoint 2010 – Provisioning User Profile Synchronization&lt;br /&gt;
&lt;/a&gt;&lt;a href="http://www.harbar.net/articles/sp2010ups.aspx"&gt;Rational Guide to implementing SharePoint Server 2010 User Profile Synchronization &lt;br /&gt;
&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-682178736259829204?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/682178736259829204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/user-profile-synchronization-service.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/682178736259829204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/682178736259829204'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/user-profile-synchronization-service.html' title='User Profile Synchronization Service failed to start'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/TPH11okMspI/AAAAAAAAAkU/xovHbUDo2B4/s72-c/secpol.png.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-9024968605535181231</id><published>2010-05-03T06:49:00.000-07:00</published><updated>2010-05-10T07:08:33.796-07:00</updated><title type='text'>Branding your Sharepoint 2010 Site</title><content type='html'>Ref:&lt;br /&gt;
&lt;a href="http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=338"&gt;SharePoint 2010 Themes and Resources for Upgrading a Custom Master Page&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://erikswenson.blogspot.com/2010/01/sharepoint-2010-css-references-in.html"&gt;SharePoint 2010 CSS references in Master Pages &lt;/a&gt;&lt;br /&gt;
&lt;a href="http://technet.microsoft.com/hi-in/library/cc263203(en-us,office.14).aspx"&gt;http://technet.microsoft.com/hi-in/library/cc263203(en-us,office.14).aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://styledpoint.com/blog/ribbon-customization-changing-placement-look-and-behavior/"&gt;http://styledpoint.com/blog/ribbon-customization-changing-placement-look-and-behavior/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blog.drisgill.com/"&gt;http://blog.drisgill.com/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.nonlinearcreations.com/whitepaper/index.asp?id=17"&gt;http://www.nonlinearcreations.com/whitepaper/index.asp?id=17&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Categories/Category.aspx?CategoryId=16&amp;Name=Branding"&gt;http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Categories/Category.aspx?CategoryId=16&amp;Name=Branding&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/sharepointdesigner/archive/2010/04/09/working-with-the-sharepoint-theming-engine.aspx"&gt;Working with the SharePoint Theming Engine&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Sample:&lt;br /&gt;
&lt;a href="http://www.digitalatmosphere.com.au/SitePages/Home.aspx"&gt;http://www.digitalatmosphere.com.au/SitePages/Home.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-9024968605535181231?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/9024968605535181231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/branding-your-sharepoint-2010-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9024968605535181231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9024968605535181231'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/05/branding-your-sharepoint-2010-site.html' title='Branding your Sharepoint 2010 Site'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-9172851163024979400</id><published>2010-04-30T11:21:00.000-07:00</published><updated>2010-05-28T07:47:35.141-07:00</updated><title type='text'>Custom edit forms in Content Types</title><content type='html'>If you have tried to add a custom edit form through a content type and deploy it as a feature.. the RTM version of sharepoint 2010 does not register the custom forms. &lt;br /&gt;
&lt;br /&gt;
e.g. elements.xml &lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;
 &amp;lt;!-- Parent ContentType: Workflow Task (0x010801) --&amp;gt;
 &amp;lt;ContentType ID="0x010801007fc29cb23c2049c3985ccdb95fc8331f" Name="ReviewTask" Group="Content Types" Description="Review workflows task purpose" Inherits="TRUE" Version="0"&amp;gt;
  &amp;lt;FieldRefs&amp;gt;
   &amp;lt;FieldRef ID="{2C2BE3C6-0EB6-4F53-B612-CF49A7EF4013}" Name="Review Status" /&amp;gt;
   &amp;lt;FieldRef ID="{CE1D0566-DDC6-4AA3-80C2-6CEA892F105E}" Name="Review Date" /&amp;gt;
   &amp;lt;FieldRef ID="{07CB9AA2-0102-4741-9F9A-AC4A7D62D769}" Name="Review Comments" /&amp;gt;
  &amp;lt;/FieldRefs&amp;gt;
  &amp;lt;XmlDocuments&amp;gt;
   &amp;lt;XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url"&amp;gt;
    &amp;lt;FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url"&amp;gt;
     &amp;lt;New&amp;gt;_layouts/My/ReviewTaskEditForm/TaskEditForm.aspx&amp;lt;/New&amp;gt;
     &amp;lt;Display&amp;gt;_layouts/My/ReviewTaskEditForm/TaskEditForm.aspx&amp;lt;/Display&amp;gt;
     &amp;lt;Edit&amp;gt;_layouts/My/ReviewTaskEditForm/TaskEditForm.aspx&amp;lt;/Edit&amp;gt;
    &amp;lt;/FormUrls&amp;gt;
   &amp;lt;/XmlDocument&amp;gt;
  &amp;lt;/XmlDocuments&amp;gt;
 &amp;lt;/ContentType&amp;gt;
&amp;lt;/Elements&amp;gt;
&lt;/pre&gt;Am I misssing something.. NamespaceURI ? Bug ??&lt;br /&gt;
&lt;br /&gt;
I have tried taking an example of the already installed features that came out of box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
msdn also does not provide sufficient information.. it is infact outdated .. &lt;a href="http://msdn.microsoft.com/en-us/library/ms473210(v=office.14).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms473210(v=office.14).aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It may be a bug, which may need a patch.&lt;br /&gt;
&lt;br /&gt;
Solution : it looks like the attributes Inherits="TRUE" cause this behavior... just remove it and it will be ok!&lt;br /&gt;
&lt;br /&gt;
Ref :&lt;br /&gt;
&lt;a href="http://social.msdn.microsoft.com/Forums/en/sharepoint2010programming/thread/92d11bae-2e5d-442e-97c7-4ccd820b6da9"&gt;http://social.msdn.microsoft.com/Forums/en/sharepoint2010programming/thread/92d11bae-2e5d-442e-97c7-4ccd820b6da9&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-9172851163024979400?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/9172851163024979400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/custom-edit-forms-in-content-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9172851163024979400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9172851163024979400'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/custom-edit-forms-in-content-types.html' title='Custom edit forms in Content Types'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-100291180784640405</id><published>2010-04-29T09:54:00.000-07:00</published><updated>2010-04-29T09:54:24.429-07:00</updated><title type='text'>Word cannot save file to a Sharepoint Library in Windows Server 2008</title><content type='html'>If you want features like the Open in Explorer view working properly or you have problems opening a sharepoint location from any of the Office products.. make sure that webclient service is running.&lt;br /&gt;
Webclient service enables Windows-based programs to create, access, and modigy Internet-based files.&lt;br /&gt;
&lt;br /&gt;
In windows server 2008, the webclient service is not installed by default. So these machines are not capable of creating a new document and saving directly to Sharepoint document library. You have to enable the Desktop Experience feature enabled to view it.&lt;br /&gt;
&lt;br /&gt;
Ref:&lt;br /&gt;
&lt;a href="http://support.microsoft.com/kb/955377"&gt;http://support.microsoft.com/kb/955377&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-100291180784640405?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/100291180784640405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/word-cannot-save-file-to-sharepoint.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/100291180784640405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/100291180784640405'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/word-cannot-save-file-to-sharepoint.html' title='Word cannot save file to a Sharepoint Library in Windows Server 2008'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1452487233487445754</id><published>2010-04-28T15:23:00.000-07:00</published><updated>2010-10-12T12:43:36.514-07:00</updated><title type='text'>Configure Office Web Apps for Sharepoint 2010 with DC</title><content type='html'>&lt;h3&gt;configure Office Web Apps for Sharepoint 2010 farm with Domain Controller&lt;/h3&gt;&lt;br /&gt;
The MSDN article gives detailed steps on how to configure Office Web Apps here .. &lt;br /&gt;
&lt;a href="http://technet.microsoft.com/en-us/library/ff431687(office.14).aspx#bkmk_ins_exis_farm"&gt;http://technet.microsoft.com/en-us/library/ff431687(office.14).aspx#bkmk_ins_exis_farm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you have domain controller (DC).. it may not work immediately.. Additional configuration is required for Word and PowerPoint as described here..&lt;br /&gt;
&lt;a href="http://geeksthenewblack.wordpress.com/2009/11/27/installing-office-web-apps-in-a-standalone-sharepoint-2010-environment/"&gt;http://geeksthenewblack.wordpress.com/2009/11/27/installing-office-web-apps-in-a-standalone-sharepoint-2010-environment/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can find the names of the services through powershell by Get-SPServiceApplication, and then change the names in the script as necessary or goto central Admin &amp;gt; Application Management &amp;gt; Service Applications &amp;gt; Manage Service Applications&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;for Word &lt;/h5&gt;&lt;pre class="brush: javascript"&gt;$e = Get-SPServiceApplication | where {$_.TypeName.Equals("Word Viewing Service Application")}
$e.WordServerIsSandboxed = $false
$e.WordServerIsSandboxed
&lt;/pre&gt;&lt;br /&gt;
&lt;h5&gt;#(Please use the below script for PowerPointServiceApplication - You need to enter "Y" for the answer of each cmd)&lt;/h5&gt;&lt;pre class="brush: javascript"&gt;Get-SPPowerPointServiceApplication | Set-SPPowerPointServiceApplication -EnableSandboxedViewing $false
Get-SPPowerPointServiceApplication | Set-SPPowerPointServiceApplication -EnableSandboxedEditing $false
&lt;/pre&gt;&lt;br /&gt;
In the server’s c:\windows\system32\inetsrv\config\applicationHost.config&lt;br /&gt;
Add the line below in the end of the dynamicTypes.&lt;br /&gt;
&amp;lt;add enabled="false" mimetype="application/zip"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
IISRESET&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1452487233487445754?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1452487233487445754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-configure-office-web-apps-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1452487233487445754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1452487233487445754'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-configure-office-web-apps-for.html' title='Configure Office Web Apps for Sharepoint 2010 with DC'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2729760304748803478</id><published>2010-04-28T15:00:00.000-07:00</published><updated>2010-04-29T06:51:32.504-07:00</updated><title type='text'>Word experienced an error trying to open the file</title><content type='html'>If you get the error "Word experienced an error trying to open the file" or "Word has encountered a problem" while opening or creating a new document based on a template.. in SharePoint 2010&lt;br /&gt;
Or&lt;br /&gt;
if your document hangs at "Opening in Protected View"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/S9iJnSRNIeI/AAAAAAAAAcA/RWiqlpWLsWA/s1600/WordDocumentedit+error.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/S9iJnSRNIeI/AAAAAAAAAcA/RWiqlpWLsWA/s400/WordDocumentedit+error.png" tt="true" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/S9iJu1Hd_HI/AAAAAAAAAcI/od6mQvRFaf4/s1600/newfilewordtemplate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/S9iJu1Hd_HI/AAAAAAAAAcI/od6mQvRFaf4/s400/newfilewordtemplate.png" tt="true" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/S9iubg9mUKI/AAAAAAAAAcQ/QogIT4RXyq8/s1600/OpenInProtectView.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/S9iubg9mUKI/AAAAAAAAAcQ/QogIT4RXyq8/s320/OpenInProtectView.png" tt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
probably you have to disable Protected view in Office 2010..&lt;br /&gt;
&lt;br /&gt;
Below are the steps..&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Run one of the Office 2010 application (e.g. Word 2010).&lt;/li&gt;
&lt;li&gt;Click on File menu, and select Options. &lt;/li&gt;
&lt;li&gt;In the “Options” dialog, select Trust Center in the left pane.&lt;/li&gt;
&lt;li&gt;Click on Trust Center Settings in the right pane. &lt;/li&gt;
&lt;li&gt;Select Protected View in the left pane of “Trust Center” dialog.&lt;/li&gt;
&lt;li&gt;Disable any of all of the protected view options as below by unticking the check boxes: &lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Enable Protected View for files that fail validation&lt;/li&gt;
&lt;li&gt;Enable Protected View for files originating from the Internet&lt;/li&gt;
&lt;li&gt;Enable Protected View for files located in potentially unsafe locations&lt;/li&gt;
&lt;li&gt;Enable Protected View for Outlook attachments&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
Ref :&lt;br /&gt;
&lt;a href="http://www.mydigitallife.info/2009/12/29/how-to-disable-read-only-protected-view-in-office-2010/"&gt;http://www.mydigitallife.info/2009/12/29/how-to-disable-read-only-protected-view-in-office-2010/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2729760304748803478?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2729760304748803478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/word-experienced-error-trying-to-open.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2729760304748803478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2729760304748803478'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/word-experienced-error-trying-to-open.html' title='Word experienced an error trying to open the file'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/S9iJnSRNIeI/AAAAAAAAAcA/RWiqlpWLsWA/s72-c/WordDocumentedit+error.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-7392778559831102997</id><published>2010-04-27T07:21:00.000-07:00</published><updated>2010-04-29T06:51:50.545-07:00</updated><title type='text'>THMX theme reference</title><content type='html'>&lt;h3&gt;SharePoint 2010 THMX theme reference &lt;/h3&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/S9bywsqaDuI/AAAAAAAAAb4/ZOb4x7DQoRk/s1600/ThemeBrandingReference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="427" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/S9bywsqaDuI/AAAAAAAAAb4/ZOb4x7DQoRk/s640/ThemeBrandingReference.png" tt="true" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-7392778559831102997?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/7392778559831102997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/sharepoint-2010-thmx-theme-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7392778559831102997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7392778559831102997'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/sharepoint-2010-thmx-theme-reference.html' title='THMX theme reference'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/S9bywsqaDuI/AAAAAAAAAb4/ZOb4x7DQoRk/s72-c/ThemeBrandingReference.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-5605332732372557782</id><published>2010-04-27T05:46:00.000-07:00</published><updated>2010-06-23T10:48:45.436-07:00</updated><title type='text'>how to use delegate controls in Sharepoint 2010</title><content type='html'>&lt;h3&gt;use delegate controls in Sharepoint 2010&lt;/h3&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;GlobalNavigation Delegate Control&lt;/h5&gt;&lt;pre class="brush: xml"&gt;&amp;lt;delegatecontrol controlid="GlobalNavigation" runat="server"&amp;gt;&amp;lt;/delegatecontrol&amp;gt;

&lt;/pre&gt;The GlobalNavigation delegate control is at the top of the v4 masterpage just before the ribbon. This control can be used to add content to the top of the page by using a user control.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_g-JN_WB_wo4/S9bcoxk2juI/AAAAAAAAAbw/hN-l1ULDB-s/s1600/GlobalNavDelegateCtrl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="315" src="http://2.bp.blogspot.com/_g-JN_WB_wo4/S9bcoxk2juI/AAAAAAAAAbw/hN-l1ULDB-s/s640/GlobalNavDelegateCtrl.png" tt="true" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h5&gt;AdditionalPageHead Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;GlobalSiteLink0 Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;GlobalSiteLink2 Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;PublishingConsole Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;TopNavigationDataSource Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;SmallSearchInputBox Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;GlobalSiteLink3 Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;QuickLaunchDataSource Delegate Control&lt;/h5&gt;&lt;br /&gt;
&lt;h5&gt;TreeViewAndDataSource Delegate Control&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-5605332732372557782?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/5605332732372557782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-use-delegate-controls-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5605332732372557782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/5605332732372557782'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-use-delegate-controls-in.html' title='how to use delegate controls in Sharepoint 2010'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_g-JN_WB_wo4/S9bcoxk2juI/AAAAAAAAAbw/hN-l1ULDB-s/s72-c/GlobalNavDelegateCtrl.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2580654706060335779</id><published>2010-04-26T09:05:00.000-07:00</published><updated>2010-04-29T06:52:16.076-07:00</updated><title type='text'>Capacity Planning for SharePoint 2010</title><content type='html'>Only references&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=332"&gt;1. What’s New in SharePoint 2010 Capacity Planning ( Joel Oleson )&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2580654706060335779?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2580654706060335779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/sharepoint-2010-capacity-planning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2580654706060335779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2580654706060335779'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/sharepoint-2010-capacity-planning.html' title='Capacity Planning for SharePoint 2010'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3600917014008454611</id><published>2010-04-23T14:32:00.000-07:00</published><updated>2010-04-29T06:52:27.275-07:00</updated><title type='text'>Programatically redirect to custom error page</title><content type='html'>&lt;h3&gt;programatically redirect to custom error page&lt;/h3&gt;&lt;br /&gt;
&lt;b&gt;To set a custom error page&lt;/b&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;const string CustomErrorPage = "/_layouts/CustomPageMappings/Error.aspx"; 

webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, CustomErrorPage);
&lt;/pre&gt;ref:&lt;br /&gt;
&lt;a href="http://todd-carter.com/post/2010/04/07/An-Expected-Error-Has-Occurred.aspx"&gt;http://todd-carter.com/post/2010/04/07/An-Expected-Error-Has-Occurred.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To call the error page ( custom or default ) &lt;/b&gt;&lt;br /&gt;
You can use the SPUtility.TransferToErrorPage method in any Web Part or custom code&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;try
{    
//Code that might cause an exception
}
catch (Exception ex)
{    
SPUtility.TransferToErrorPage(ex.Message);
}
&lt;/pre&gt;ref:&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.transfertoerrorpage.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.transfertoerrorpage.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3600917014008454611?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3600917014008454611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-programatically-redirect-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3600917014008454611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3600917014008454611'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-programatically-redirect-to.html' title='Programatically redirect to custom error page'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3011338330489354412</id><published>2010-04-21T14:50:00.000-07:00</published><updated>2011-05-25T21:10:57.075-07:00</updated><title type='text'>Programatically show processing screen ( Using SPLongOperation )</title><content type='html'>&lt;h3&gt;how to programatically show processing screen ( Using SPLongOperation )&lt;/h3&gt;&lt;br /&gt;
It would be nice if we could show a processing like the below that comes out of the box in Sharepoint 2010 which says "Processing... Please wait while your changes are processed."&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/S89wWt_bmAI/AAAAAAAAAbo/tWH4XWe3m3c/s1600/Processing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="228" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/S89wWt_bmAI/AAAAAAAAAbo/tWH4XWe3m3c/s640/Processing.png" width="640" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This can be achieved programatically by the following code&lt;br /&gt;
Code Example:1&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;SPLongOperation.BeginOperation beginOperation = null;

if (beginOperation == null)
{
    beginOperation = delegate(SPLongOperation longOperation)
    {
        // Long running code here .. 

        longOperation.End("settings.aspx", SPRedirectFlags.RelativeToLayoutsPage, HttpContext.Current, null);
    };
}
SPLongOperation.Begin(beginOperation);
&lt;/pre&gt;&lt;br /&gt;
longOperation.End() can be used to specify the redirect page when the operation ends. In the above example, it will redirect to the settings page of the site.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code Example 2: Simple method&lt;br /&gt;
&lt;pre class="brush:c#"&gt;// BEGIN long-running operation
SPLongOperation lop = new SPLongOperation(this.Page);
lop.Begin();

// your long operation code here
      
// END long-running operation
lop.End(Customers.DefaultViewUrl, Microsoft.SharePoint.Utilities.SPRedirectFlags.Default, this.Context, "");
&lt;/pre&gt;&lt;br /&gt;
Code Example:3 Custom Wait message&lt;br /&gt;
&lt;pre class="brush: c#"&gt;// BEGIN long-running operation
SPLongOperation lop = new SPLongOperation(this.Page);
lop.LeadingHTML = "&lt;div&gt;&lt;h2&gt;Adding customers&lt;/h2&gt;&lt;/div&gt;";
lop.TrailingHTML = "&lt;div&gt;&lt;h3&gt;Please be patient&lt;/h3&gt;&lt;/div&gt;";
lop.Begin();

// your long operation code here

      
// END long-running operation
lop.End(Customers.DefaultViewUrl, Microsoft.SharePoint.Utilities.SPRedirectFlags.Default, this.Context, "");
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also refer to :&lt;br /&gt;
&lt;a href="http://peterheibrink.wordpress.com/2009/09/07/splongoperation/"&gt;http://peterheibrink.wordpress.com/2009/09/07/splongoperation/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3011338330489354412?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3011338330489354412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-programatically-show-processing.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3011338330489354412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3011338330489354412'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-programatically-show-processing.html' title='Programatically show processing screen ( Using SPLongOperation )'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_g-JN_WB_wo4/S89wWt_bmAI/AAAAAAAAAbo/tWH4XWe3m3c/s72-c/Processing.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2482925067226780422</id><published>2010-04-21T14:18:00.000-07:00</published><updated>2010-10-12T20:08:31.630-07:00</updated><title type='text'>Deploy Thmx theme as feature</title><content type='html'>&lt;h3&gt;deploy new v4 theme as feature&lt;/h3&gt;&lt;br /&gt;
&lt;span style="font-size: 11pt;"&gt;&lt;strong&gt;Creating a custom theme &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Goto C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\Lists\themes &lt;/li&gt;
&lt;li&gt;Copy one of the OOTB themes into your working folder e.g. c:\work and rename it to MyTheme.thmx &lt;/li&gt;
&lt;li&gt;Open this file in &lt;a href="http://connect.microsoft.com/ThemeBuilder/Downloads/DownloadDetails.aspx?DownloadID=17634"&gt;Microsoft Theme Builder&lt;/a&gt;, name it appropriately, in this case 'MyTheme' and change the colors to suit your needs and save the file. &lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/TLUf9RpFzhI/AAAAAAAAAiM/Kph5QTCNihM/s1600/ThemBuilder.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ex="true" height="236" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/TLUf9RpFzhI/AAAAAAAAAiM/Kph5QTCNihM/s640/ThemBuilder.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="font-size: 11pt;"&gt;&lt;strong&gt;Creating a SharePoint Project &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create an 'Empty SharePoint Project' called 'MyCustomTheme' &lt;/li&gt;
&lt;li&gt;In VS, right click on project &amp;gt; Add &amp;gt; New Item.. &amp;gt; Module , named 'ModuleMyTheme' &lt;/li&gt;
&lt;li&gt;Drag drop the .thmx file from the file system into the 'ModuleMyTheme' in VS &lt;/li&gt;
&lt;li&gt;Delete the sample.txt file from the module folder. The resultant VS solution explorer should as follows.. &lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/TLUf9-GnrQI/AAAAAAAAAiQ/LoOQZH98NJE/s1600/VSProject.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ex="true" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/TLUf9-GnrQI/AAAAAAAAAiQ/LoOQZH98NJE/s1600/VSProject.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="font-size: 11pt;"&gt;&lt;strong&gt;Modifying the elements.xml &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
The xml that is generated after the above steps is &lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;?&lt;span style="color: #a31515;"&gt;xml&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;version&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1.0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;encoding&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;utf-8&lt;/span&gt;"&lt;span style="color: blue;"&gt;?&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;Elements&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;xmlns&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;Module&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Name&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ModuleMyTheme&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;File&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Path&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ModuleMyTheme\MyTheme.thmx&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Url&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ModuleMyTheme/MyTheme.thmx&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;/&lt;span style="color: #a31515;"&gt;Module&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;/&lt;span style="color: #a31515;"&gt;Elements&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
The source of the thmx file is represented by File &amp;gt; Path, which is the location from the feature folder. &lt;br /&gt;
The destination should be the theme folder under _catalogs i.e. '_catalogs/theme/MyTheme.thmx'. This has to be added as the URL attribute in module tag plus the URL attribute in the File tag. The final xml looks like the following.. &lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;?&lt;span style="color: #a31515;"&gt;xml&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;version&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1.0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;encoding&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;utf-8&lt;/span&gt;"&lt;span style="color: blue;"&gt;?&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;Elements&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;xmlns&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;Module&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Name&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ModuleMyTheme&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Url&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;_catalogs/theme&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;&lt;span style="color: #a31515;"&gt;File&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Path&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ModuleMyTheme\MyTheme.thmx&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;span style="color: red;"&gt;Url&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;MyTheme.thmx&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;/&lt;span style="color: #a31515;"&gt;Module&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&amp;lt;/&lt;span style="color: #a31515;"&gt;Elements&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Time to deploy – right-click the project and select deploy. &lt;br /&gt;
Once deployed, navigate to the site &amp;gt; Site Actions &amp;gt; Site Settings &amp;gt; Look and Feel &amp;gt; Site Themes, you will find your custom theme deployed.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Download Code&lt;/strong&gt; &lt;a href="http://www.4shared.com/file/VGnJTqyf/MyCustomTheme.html"&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You may also be interested in the following..&lt;br /&gt;
&lt;a href="http://howtosharepoint.blogspot.com/2010/04/how-to-apply-theme-programmatically.html"&gt;Apply theme programmatically Sharepoint 2010&lt;/a&gt; sample usage: if you wanted to apply the newly deployed theme using a feature  reciever&lt;br /&gt;
&lt;a href="http://howtosharepoint.blogspot.com/2010/04/sharepoint-2010-thmx-theme-reference.html"&gt;THMX theme reference&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2482925067226780422?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2482925067226780422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-deploy-new-theme-as-feature.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2482925067226780422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2482925067226780422'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-deploy-new-theme-as-feature.html' title='Deploy Thmx theme as feature'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_g-JN_WB_wo4/TLUf9RpFzhI/AAAAAAAAAiM/Kph5QTCNihM/s72-c/ThemBuilder.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-8018925867425571722</id><published>2010-04-21T12:51:00.000-07:00</published><updated>2010-05-26T08:33:41.497-07:00</updated><title type='text'>Apply theme programmatically Sharepoint 2010</title><content type='html'>&lt;h3&gt;Apply a theme programmatically in Sharepoint 2010&lt;/h3&gt;&lt;h5&gt;To find the current v4 theme applied to the web&lt;/h5&gt;&lt;pre class="brush: csharp"&gt;ThmxTheme webThmxTheme = null;
string themeUrlForWeb = ThmxTheme.GetThemeUrlForWeb(web);
if (!string.IsNullOrEmpty(themeUrlForWeb))
{
 webThmxTheme = ThmxTheme.Open(web.Site, themeUrlForWeb);
}
string ThemeName = webThmxTheme.Name;
&lt;/pre&gt;&lt;h5&gt;To apply a&amp;nbsp; v4 theme (thmx)&lt;/h5&gt;&lt;pre class="brush: csharp"&gt;SPSite site = new SPSite("http://localhost:8080/"); // or whatever way you get the SPSite instance 
SPWeb web = site.OpenWeb(); // or whatever way you get the SP web instance
ReadOnlyCollection&amp;lt;thmxtheme&amp;gt; managedThemes = null;
managedThemes = ThmxTheme.GetManagedThemes(site);
foreach (ThmxTheme theme2 in managedThemes)
{
    if (theme2.Name == "ThemeName")
    {
        theme2.ApplyTo(web, true);
        break;
    }
}
&lt;/pre&gt;&lt;/br&gt;&lt;br /&gt;
&lt;h5&gt;To apply a default v4 theme (thmx)&lt;/h5&gt;&lt;pre class="brush: csharp"&gt;// set the theme to be default
ThmxTheme.SetThemeUrlForWeb(web, null, true);
&lt;/pre&gt;&lt;/br&gt;&lt;br /&gt;
&lt;/br&gt;&lt;br /&gt;
&lt;h5&gt;Error: The web being updated was changed by an external process.&lt;/h5&gt;You may encounter this error if you are applying a theme in conjunction with web.Update().. e.g.&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using (SPWeb web = (SPWeb)properties.Feature.Parent)
{
using (SPSite site = new SPSite(web.Site.ID))
{
// The next line will cause web.Update() below to throw error "The web being updated was changed by an external process."
// ThmxTheme.SetThemeUrlForWeb(web, null, true);

web.MasterUrl = "/_catalogs/masterpage/v4.master";
web.CustomMasterUrl = "/_catalogs/masterpage/v4.master";

web.Update();

// the below line should work fine
ThmxTheme.SetThemeUrlForWeb(web, null, true);
}
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-8018925867425571722?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/8018925867425571722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-apply-theme-programmatically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/8018925867425571722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/8018925867425571722'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/04/how-to-apply-theme-programmatically.html' title='Apply theme programmatically Sharepoint 2010'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-453384807588598521</id><published>2010-02-13T13:05:00.000-08:00</published><updated>2010-07-13T17:16:00.383-07:00</updated><title type='text'>Sharepoint 2010 - Folder Selector Webpart  ( Picker ) along with List and Web</title><content type='html'>&lt;strong&gt;Sharepoint Folder Picker WebPart ( along with List and Site Picker )&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot of places where Sharepoint provides a nice Picker to select a list ( and in some cases sites itself ). Even though the Picker shows Folders of the list, you cannot select the folder for your use.&lt;br /&gt;
&lt;br /&gt;
In this post, I will show you how you can select the folders too, using the list picker provided by sharepoint. The code for this post is attached at the end of the post.&lt;br /&gt;
&lt;br /&gt;
For this webpart, first we need a reference to the PickerTreeDialog.js file&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;protected override void OnLoad(EventArgs e)
{
 base.OnLoad(e);

 Page.ClientScript.RegisterClientScriptInclude("PickerTreeDialog", 
  string.Format("/_layouts/{0}/PickerTreeDialog.js", "1033"));

 if (_hiddenSelectionField != null &amp;&amp; !string.IsNullOrEmpty(_hiddenSelectionField.Value))
 {
  _listUrl.Text = GetObjectUrl(_hiddenSelectionField.Value);
  _hiddenSelectionField.Value = string.Empty;
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Next we need to call the 'LaunchPickerTreeDialog' javascript function defined in the PickerTreeDialog.js file. &lt;br /&gt;
&lt;strong&gt;function LaunchPickerTreeDialog(title, text, filter, anchor, siteUrl, select, featureId, errorString, iconUrl, sourceSmtObjectId, callback)&lt;/strong&gt;&lt;br /&gt;
There are a few parameters that has to be passed to the LaunchPickerTreeDialog js function. Some of the important ones are as follows..&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;siteurl : determines which site collection the treeviewpicker.aspx will show data from.&lt;/li&gt;
&lt;li&gt;filter: 'WebsOnly' will show only webs, if omitted will show all webs, lists and folders&lt;/li&gt;
&lt;li&gt;callback: the js function that will be called with the results of the selection.&lt;/li&gt;
&lt;/ul&gt;&lt;pre class="brush: csharp"&gt;private void RegisterSelectListScript(SPWeb web)
{
 StringBuilder launchPicker = new StringBuilder();
 launchPicker.Append("&lt;script LANGUAGE='JavaScript' &gt;");
 launchPicker.Append("function launchPicker()\n");
 launchPicker.Append("{\n");
 launchPicker.Append("   var listurlfield = document.getElementById(\"" + _listUrl.ClientID + "\");\n");
 launchPicker.Append("   var hiddenSelectionfield = document.getElementById(\"" 
  + _hiddenSelectionField.ClientID + "\");\n");
 launchPicker.AppendFormat("   var defaulturl = '{0}';\n", web.ServerRelativeUrl);
 launchPicker.Append("   var url = defaulturl;\n");
 //launchPicker.Append("   if(listurlfield != null &amp;&amp; listurlfield.value != '')\n");
 //launchPicker.Append("   {\n");
 //launchPicker.Append("       url = listurlfield.value.substring(0,listurlfield.value.lastIndexOf('/'));");
 //launchPicker.Append("   }\n");
 launchPicker.Append("   var callback=function(arr)\n");
 launchPicker.Append("   {\n");
 launchPicker.Append("       if(arr==null || arr==undefined)\n");
 launchPicker.Append("           return;\n");
 launchPicker.Append("       var completeSel=arr[0];\n");
 launchPicker.Append("       var site=arr[1];\n");
 launchPicker.Append("       var list=arr[2];\n");
 launchPicker.Append("       if(completeSel != '')\n");
 launchPicker.Append("       {\n");
 launchPicker.Append("           hiddenSelectionfield.value = completeSel+\"&amp;\"+site;\n");
 launchPicker.Append("       }\n");
 launchPicker.Append("       " + Page.ClientScript.GetPostBackEventReference(_listUrl, string.Empty) + ";\n");
 launchPicker.Append("   }\n");
 launchPicker.Append("LaunchPickerTreeDialog(\'CbqPickerSelectListTitle','CbqPickerSelectListTitle',"
+"'listsOnly',\"\",url,null,\"\",\"\",\"/_layouts/images/generic.png\", 0, callback );\n");
 launchPicker.Append("}\n");
 launchPicker.Append("&lt;/SCRIPT&gt;");

 if (!Page.ClientScript.IsClientScriptBlockRegistered("launchPicker"))
  Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "launchPicker", launchPicker.ToString());
}
&lt;/pre&gt;&lt;br /&gt;
The callback function will return an array of results...&lt;br /&gt;
arr[0] = smtPickerSelection.Value&lt;br /&gt;
arr[1] = smtPickerSelectionWebServerRelativeUrl.Value&lt;br /&gt;
arr[2] = smtPickerSelectionListName.Value &lt;br /&gt;
&lt;br /&gt;
Using the first value.. we can determine which type of Object is selected from the picker tree. Examples of valueSeletion at arr[0] are&lt;br /&gt;
if a web is selected&lt;br /&gt;
SPWeb:18565691-e8a0-4839-9b0b-4a259069a789: &lt;br /&gt;
if a list is selected&lt;br /&gt;
SPList:0044bafc-6559-4bc0-bb8e-b7326af5ebce?SPWeb:27ab36b4-dd10-49de-8094-ff5b2e3fe34c: &lt;br /&gt;
if a folder is selected&lt;br /&gt;
SPFolder:75f2065c-51f6-4007-9fcf-0a01a18eeeae?SPWeb:27ab36b4-dd10-49de-8094-ff5b2e3fe34c: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we pass this values to the following function to return the proper output.&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;public string GetObjectUrl(string ValueFromTreePicker)
{
 string[] val = ValueFromTreePicker.Split('&amp;');
 string objUrl = string.Empty;
 string siteUrl = string.Empty;
 string guidVal = string.Empty;
 string tempGuid = string.Empty;
 if (val.Length &gt; 1)
 {
  guidVal = val[0];
  siteUrl = val[1];
 }
 else
 {
  return ValueFromTreePicker;
 }
 SPSecurity.RunWithElevatedPrivileges(delegate()
 {
  using (SPSite siteCollection = new SPSite(SPContext.Current.Site.WebApplication.GetResponseUri(SPContext.Current.Site.Zone).ToString() 
   + siteUrl.TrimStart('/'))) 
  {
   using (SPWeb web = siteCollection.OpenWeb()) 
   {
    if (guidVal.StartsWith("SPWeb:"))
    {
     objUrl = siteUrl;
    }
    else if (guidVal.StartsWith("SPList:"))
    {
     tempGuid = guidVal.Substring(0, guidVal.IndexOf('?'));
     tempGuid = tempGuid.Substring("SPList:".Length);
     SPList list = web.Lists[new Guid(tempGuid)];
     objUrl = list.ParentWebUrl + "/" + list.Title;
    }
    else if (guidVal.StartsWith("SPFolder:"))
    {
     tempGuid = guidVal.Substring(0, guidVal.IndexOf('?'));
     tempGuid = tempGuid.Substring("SPFolder:".Length);
     objUrl = web.GetFolder(new Guid(tempGuid)).ServerRelativeUrl;
    }
    else
    {
     objUrl = ValueFromTreePicker;
    }
   }
  }
 });
 return objUrl;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Download Code&lt;/strong&gt;&lt;br /&gt;
&lt;a href="http://www.4shared.com/file/221576598/1567b0/FolderSelector.html"&gt;SharePoint 2010 Project Code&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.4shared.com/file/221576821/92e5958c/FolderSelector_cs.html"&gt;Just the webpart cs file&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Ref :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=72"&gt;http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=72&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://74.125.47.132/search?q=cache:l-s1-iWIfSMJ:69.10.233.10/KB/sharepoint/SPQueryBuilderDialog.aspx+sharepoint+PickerTreeDialog.js+LaunchPickerTreeDialog+folder&amp;cd=9&amp;hl=en&amp;ct=clnk&amp;gl=us"&gt;http://74.125.47.132/search?q=cache:l-s1-iWIfSMJ:69.10.233.10/KB/sharepoint/SPQueryBuilderDialog.aspx+sharepoint+PickerTreeDialog.js+LaunchPickerTreeDialog+folder&amp;cd=9&amp;hl=en&amp;ct=clnk&amp;gl=us&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-453384807588598521?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/453384807588598521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/02/sharepoint-2010-folder-selector-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/453384807588598521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/453384807588598521'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/02/sharepoint-2010-folder-selector-and.html' title='Sharepoint 2010 - Folder Selector Webpart  ( Picker ) along with List and Web'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-9211142409163107599</id><published>2010-01-24T14:23:00.000-08:00</published><updated>2010-01-24T14:37:22.001-08:00</updated><title type='text'>Sharepoint 2010 - WebPart deployment structure</title><content type='html'>&lt;b&gt;This post is to put together the various files that is generated in Visual Studio 2010 like the manifest.xml, feature.xml, elements.xml etc. and how they work together when they are deployed as a package..&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/S1zLmf3gOoI/AAAAAAAAAbc/WjWsB7702U0/s1600-h/WebPart+Components_f.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" mt="true" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/S1zLmf3gOoI/AAAAAAAAAbc/WjWsB7702U0/s640/WebPart+Components_f.png" width="634" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;jdd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-9211142409163107599?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/9211142409163107599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/01/sharepoint-2010-webpart-deployment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9211142409163107599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/9211142409163107599'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/01/sharepoint-2010-webpart-deployment.html' title='Sharepoint 2010 - WebPart deployment structure'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_g-JN_WB_wo4/S1zLmf3gOoI/AAAAAAAAAbc/WjWsB7702U0/s72-c/WebPart+Components_f.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-2361634926742356328</id><published>2010-01-09T10:31:00.000-08:00</published><updated>2010-01-10T05:23:17.576-08:00</updated><title type='text'>Sharepoint Server 2010 Interview Questions 2</title><content type='html'>&lt;h3&gt;Sharepoint Server 2010 Interview Questions ( may also apply for MOSS 2007 ) - Part 2&lt;/h3&gt;&lt;table width="100%" style="border-bottom-style:solid; border-width: 0 0 1px 1px; font-size:14px;"&gt;&lt;tr&gt; &lt;td align=left width=15%&gt;&lt;a href="http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html"&gt;&lt;&lt; Previous&lt;/a&gt;&lt;/td&gt; &lt;td align=center&gt;&lt;a href="http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html"&gt;1&lt;/a&gt; 2&lt;/td&gt; &lt;td align=right width=15%&gt; Next &gt;&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt; - What does AllowUnsafeUpdates do ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the &lt;a href='http://msdn2.microsoft.com/en-us/library/ms478070.aspx'&gt;AllowUnsafeUpdates&lt;/a&gt; property. C#:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using(SPSite mySite = new SPSite("yourserver"))
{ using(SPWeb myWeb = mySite.OpenWeb())
{
myWeb.AllowUnsafeUpdates = true;
SPList interviewList = myWeb.Lists["listtoinsert"];
SPListItem newItem = interviewList.Items.Add();
newItem["interview"] = "interview";
newItem.Update();
}
}
&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt; - What does RunWithElevatedPrivileges do?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Assume that you have a Web Part in which you want to display information obtained through the Windows SharePoint Services object model, such as the name of the current site collection owner, usage statistics, or auditing information. These are examples of calls into the object model that require site-administration privileges. Your Web Part experiences an access-denied error if it attempts to obtain this information when the current user is not a site administrator. The request is initiated by a nonprivileged user. you can still successfully make these calls into the object model by calling the &lt;a href='http://msdn2.microsoft.com/en-us/library/ms439682.aspx'&gt;RunWithElevatedPrivileges&lt;/a&gt; method provided by the &lt;a href='http://msdn2.microsoft.com/en-us/library/ms441329.aspx'&gt;SPSecurity&lt;/a&gt; class. C#:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;SPSite siteColl = SPContext.Current.Site;
SPWeb site = SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite ElevatedsiteColl = new SPSite(siteColl.ID))
{
using (SPWeb ElevatedSite = ElevatedsiteColl.OpenWeb(site.ID))
{
string SiteCollectionOwner = ElevatedsiteColl.Owner.Name;
string Visits = ElevatedsiteColl.Usage.Visits.ToString();
string RootAuditEntries = ElevatedSite.RootFolder.Audit.GetEntries().Count.ToString();
}
}
});
&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt; - What is a SharePoint Feature? What files are used to define a feature?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances.&lt;br /&gt;
Scopes include&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Farm&lt;/li&gt;
&lt;li&gt;WebApplication &lt;/li&gt;
&lt;li&gt;Site (site collection)&lt;/li&gt;
&lt;li&gt;Web  (site)&lt;/li&gt;
&lt;/ul&gt;Features have their own receiver architecture, which allow you to trap events such as when a feature is &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;installing&lt;/li&gt;
&lt;li&gt;uninstalling&lt;/li&gt;
&lt;li&gt;activated&lt;/li&gt;
&lt;li&gt;deactivated&lt;/li&gt;
&lt;/ul&gt;The element types that can be defined by a feature include &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;menu commands&lt;/li&gt;
&lt;li&gt;link commands&lt;/li&gt;
&lt;li&gt;page templates&lt;/li&gt;
&lt;li&gt;page instances&lt;/li&gt;
&lt;li&gt;list definitions&lt;/li&gt;
&lt;li&gt;list instances&lt;/li&gt;
&lt;li&gt;event handlers&lt;/li&gt;
&lt;li&gt;workflows&lt;/li&gt;
&lt;/ul&gt;The two files that are used to define a feature are &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;feature.xml&lt;/li&gt;
&lt;li&gt;manifest file(elements.xml)&lt;/li&gt;
&lt;/ul&gt;The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.&lt;br /&gt;
Common stsadm commands associated with feature are&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;stsadm -o installfeature&lt;/li&gt;
&lt;li&gt;stsadm -o uninstallfeature&lt;/li&gt;
&lt;li&gt;stsadm -o activatefeature&lt;/li&gt;
&lt;li&gt;stsadm -o deactivatefeature&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt; - What are content types ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;A content type is a flexible and reusable WSS type definition that defines the columns and behavior for an item in a list or a document in a document library. &lt;br /&gt;
For example, &lt;br /&gt;
-you can create a content type for a customer presentation document with a unique set of columns, an event handler, and its own document template. &lt;br /&gt;
-You can create a second content type for a customer proposal document with a different set of columns, a workflow, and a different document template.&lt;br /&gt;
Then you can attach both the contenttypes to a document library, which allows you to capture metadata based on the contenttype selected during creation of the document.&lt;br /&gt;
&lt;br /&gt;
Content type can be created by the following&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;from the rootweb of a site collection, go to Site Action &gt; Site Settings &gt; Galleries &gt; Site content types&lt;/li&gt;
&lt;li&gt;using a feature &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;5. Workflow can be applied to what all elements of SharePoint ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;While workflow associations are often created directly on lists and document libraries, a workflow association can also be created on a content type that exists within the Content Type Gallery for the current site or content types defined within a list. &lt;br /&gt;
In short, it can be applied ... &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;At the level of a list (or document library)&lt;/li&gt;
&lt;li&gt;At the level of a content type defined at site scope&lt;/li&gt;
&lt;li&gt;At the level of a site ( Sharepoint 2010 )&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt; - What are the ways to initiate the workflow ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;&lt;ul&gt;&lt;li&gt;Automatic (on item added or item deleted)&lt;/li&gt;
&lt;li&gt;Manual (standard WSS UI interface)&lt;/li&gt;
&lt;li&gt;Manual (Custom UI Interface)&lt;/li&gt;
&lt;li&gt;Programatically through custom code&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;7. What are the types of input forms that can be created for a workflow ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;You can create four different types of input forms including an association form, an initiation form, a modification form, and a task edit form. Note that these forms are optional when you create a workflow template.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;8. What are ways to create input forms for workflow ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Two different approaches can be used to develop custom input forms for a WSS workflow template.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)&lt;/li&gt;
&lt;li&gt;using Microsoft Office InfoPath 2007 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;9. What is the difference between method activity and event activity in WF ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;10. What does SPWeb.EnsureUser method do?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. e.g SPUser usr = myWeb.EnsureUser("mmangaldas");&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;11. While creating a Webpart, which is the ideal location to Initialize my new controls ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Override the CreateChildControls method to include your new controls. To make sure that the new controls are initialized.. call 'EnsureChildControls' in the webparts Render method. You can control the exact Rendering of your controls by calling the .Render method in the webparts Render method.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;12. How to query from multiple lists ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Use SPSiteDataQuery to fetch data from multiple lists. &lt;a href='http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.lists.aspx'&gt;more details..&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;13.How Does SharePoint work?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;14. What is the difference between Syncronous &amp;amp; Asyncronous events?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;&lt;strong&gt;Syncronous&lt;/strong&gt; calls ending with 'ing' E.g. ItemDeleting Event Handler code execute BEFORE action is committed WSS waits for code to return Option to cancel and return error code&lt;br /&gt;
&lt;strong&gt;Asyncronous&lt;/strong&gt; calls ending with 'ed' E.g. ItemDeleted Event Handler code executes AFTER action is committed WSS does not wait for code to return Executed in its own Worker thread.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;15. What is ServerUpdate() ?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;Any changes in the list, i.e. new addition or modification of an item.. the operation is complete by calling the Update method.But if a List is set to maintain versions .. and you are editing an item, but don't want to save it as a new version, then use the SystemUpdate method instead and pass in 'false' as the parameter.&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Consolas'&gt;&lt;br /&gt;
&lt;strong&gt;16. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?&lt;/strong&gt;&lt;br /&gt;
&lt;div style='padding-left:20px'&gt;If you use SPQuery on any SPlist .. it will bring back results from the current folder only. If you want to get results from all the folders in the list.. then you need to specify the scope of the query by the use of ViewAttributes..&lt;br /&gt;
e.g. query.ViewAttributes = "Scope=\"Recursive\"";&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;&lt;table width="100%" style="border-bottom-style:solid; border-width: 0 0 1px 1px; font-size:14px;"&gt;&lt;tr&gt; &lt;td align=left width=15%&gt;&lt;a href="http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html"&gt;&lt;&lt; Previous&lt;/a&gt;&lt;/td&gt; &lt;td align=center&gt;&lt;a href="http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html"&gt;1&lt;/a&gt; 2&lt;/td&gt; &lt;td align=right width=15%&gt; Next &gt;&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-2361634926742356328?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/2361634926742356328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2010/01/sharepoint-server-2010-interview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2361634926742356328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/2361634926742356328'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2010/01/sharepoint-server-2010-interview.html' title='Sharepoint Server 2010 Interview Questions 2'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3113140949522286867</id><published>2009-11-20T05:44:00.000-08:00</published><updated>2009-11-20T05:46:28.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Requirement'/><category scheme='http://www.blogger.com/atom/ns#' term='Installation'/><title type='text'>Sharepoint 2010 Installation Software Requirements</title><content type='html'>&lt;strong&gt;for SharePoint 2010 Public Beta&lt;/strong&gt;&lt;br /&gt;
&lt;li&gt;Windows Server 2008 R2 x64 with hotfix &lt;a href="http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=23806"&gt;KB976462&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;.NET Framework 3.5 SP1&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt;SQL Server 2005 SP3 and CU3 or SQL Server 2008 SP1 and CU2&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3113140949522286867?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3113140949522286867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-2010-installation-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3113140949522286867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3113140949522286867'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-2010-installation-software.html' title='Sharepoint 2010 Installation Software Requirements'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-1278301340652428815</id><published>2009-11-18T05:55:00.001-08:00</published><updated>2009-11-18T05:57:49.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Foundation'/><title type='text'>Sharepoint Foundation 2010 Interview Questions</title><content type='html'>coming soon...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-1278301340652428815?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/1278301340652428815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-foundation-2010-interview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1278301340652428815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/1278301340652428815'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-foundation-2010-interview.html' title='Sharepoint Foundation 2010 Interview Questions'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-7387482278453203924</id><published>2009-11-18T05:54:00.001-08:00</published><updated>2010-04-27T19:12:52.984-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><title type='text'>Sharepoint 2010 Interview Questions</title><content type='html'>&lt;h3&gt;Sharepoint 2010 Interview Questions ( may also apply for MOSS 2007 )&lt;/h3&gt;&lt;table width="100%" style="border-bottom-style:solid; border-width: 0 0 1px 1px; font-size:14px; font-weight:bold; color:blue;"&gt;&lt;tr&gt; &lt;td align=left width=15%&gt;&lt;&lt; Previous&lt;/td&gt;&lt;br /&gt;
&lt;td align=center style='white-space:nowrap;'&gt;&lt;br /&gt;
&lt;a href='http://manomangaldas.blogspot.com/2008/01/moss-2007-sharepoint-interview.html'&gt; 1 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview.html'&gt; 2 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_07.html'&gt; 3 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_9160.html'&gt; 4 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_13.html'&gt; 5 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_7760.html'&gt; 6 &lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;&lt;br /&gt;
&lt;td align=right width=15%&gt;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview.html'&gt; Next &gt;&gt; &lt;/a&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/table&gt;&lt;br /&gt;
Q: How can I check to see if a slow loading SharePoint page has closed webparts? &lt;br /&gt;
&lt;br /&gt;
A. The way to check for closed webparts is ?contents=1 at the end of the url&lt;br /&gt;
&lt;br /&gt;
Example: http://www.sharepointjoel.com/default.aspx?contents=1&lt;br /&gt;
&lt;br /&gt;
Brings up the webpart maintenance page and I can see the categories and a content editor webpart that are closed.  These are affecting the performance of the page negatively and providing little value.  Now if I at some point want to re-add the categories web part, I should not delete it.  As well, a content editor web part will need to be recreated.  There is no recycle bin for restoring deleted content in a content editor web part.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q. why should you not use Render()? [ only use RenderContents() or use the more OO approach and implement CreateChildControls() ]&lt;br /&gt;
&lt;br /&gt;
A. Basically the WPSC provides developers with a SharePoint specific client-side DOM that allows developers to listen for events, interact with Web Parts and even set properties... all through script on the client. The WPSC is implemented using a bunch of client-side code. You can see a snippet of it if you look at the source of a SharePoint page.&lt;br /&gt;
&lt;br /&gt;
When SharePoint renders the page, it adds a unique ID to the HTML &amp;lt;TABLE&amp;gt; as well as a unique ID to the &amp;lt;DIV&amp;gt;... developers can use these ID's to get to the Web Part via client-side code. &lt;br /&gt;
&lt;br /&gt;
When you use RenderContents() or CreateChildControls(), the rendered markup produced by those methods is put inside the &amp;lt;DIV&amp;gt;. If you override Render(), you are replacing the entire &amp;lt;TABLE&amp;gt;! Thus, by replacing the entire table, you are breaking the WPSC... the whole SharePoint specific DOM.&lt;br /&gt;
&lt;br /&gt;
http://www.andrewconnell.com/blog/archive/2008/02/18/Understanding-how-Web-Parts-are-rendered-why-to-never-use.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; - What are the types of authentication available for Sharepoint 2010 ?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;&lt;ul&gt;&lt;li&gt;Claims&lt;/li&gt;
&lt;li&gt;Windows &lt;/li&gt;
&lt;li&gt;Forms-based authentication&lt;/li&gt;
&lt;/ul&gt;Ref : &lt;a href="http://technet.microsoft.com/en-us/library/cc262350%28office.14%29.aspx"&gt;http://technet.microsoft.com/en-us/library/cc262350(office.14).aspx&lt;/a&gt;&lt;/div&gt;&lt;b&gt; - What is claims based authentication ? &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;Claims is a new authentication method that SharePoint 2010 can utilize.  This allows a single authentication store for multiple types of authentication (Windows NTLM, SQL FBA, LDAP, etc) which allows all of these types of authentication to access SharePoint under a single URL.&lt;br /&gt;
&lt;br /&gt;
Claims creates a SAML token based on the sign-in, that contains the user’s identity.&lt;br /&gt;
&lt;br /&gt;
Ref: &lt;a href="http://blogs.technet.com/ritaylor/archive/2009/06/03/claims-based-authentication-an-overview.aspx"&gt;http://blogs.technet.com/ritaylor/archive/2009/06/03/claims-based-authentication-an-overview.aspx&lt;/a&gt;&lt;/div&gt;&lt;b&gt; - How do we use the claims identity outside of SharePoint?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;&lt;ul&gt;&lt;li&gt;LOB systems &lt;/li&gt;
&lt;li&gt;External partner services&lt;/li&gt;
&lt;li&gt;Separate SharePoint farms&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;b&gt; - What is LINQ to Sharepoint ? &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;&lt;ul&gt;&lt;li&gt;LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET &lt;/li&gt;
&lt;li&gt;LINQ adds, to each of the languages, a SQL-like syntax and vocabulary for querying data sources.&lt;/li&gt;
&lt;li&gt;LINQ to Sharepoint allows developers to use SQL-like syntax to query Lists and Libraries in Sharepoint.&lt;/li&gt;
&lt;li&gt;LINQ to Sharepoint internally converts the LINQ query to a CAML query to fetch records&lt;/li&gt;
&lt;li&gt;Advantage : Strongly typed access to the entities of the list. &lt;/li&gt;
&lt;li&gt;Disadvantage : If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code &lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;b&gt; - Name the tool used to create DataContent classes for use in LINQ queries?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;SPMetal.exe&lt;/div&gt;&lt;b&gt; - What are the advantages and disadvantages of LINQ to Sharepoint ?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;Advantages:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Intellisense&lt;/li&gt;
&lt;li&gt;Strongly typed access to the entities of the list&lt;/li&gt;
&lt;li&gt;Faster development&lt;/li&gt;
&lt;li&gt;Simplify complex queries&lt;/li&gt;
&lt;/ul&gt;Disadvantages:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code&lt;/li&gt;
&lt;li&gt;Extra layer to the actual CAML query&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;In Sharepoint 2010, at what levels can a workflow be activated ? ( Alt Q: What is the additional scope a workflow be activated in Sharepoint 2010 ) ?&lt;br /&gt;
Can a workflow created in Sharepoint Designer be edited in Visual Studio ?&lt;br /&gt;
&lt;b&gt; - Can MS Visio be used to create a Sharepoint workflow ? &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;MS Visio cannot be used to create the Sharepoint workflow itself, but can be used for workflow visualization. What this means is that, the flow diagram designed in Visio can be imported in Sharepoint Designer where all the functionality can be added and deployed to Sharepoint.&lt;br /&gt;
&lt;u&gt;Note:&lt;/u&gt;&lt;br /&gt;
To use Visio 2010 for workflow visualization, you must be running the Enterprise version of SharePoint Server 2010 and Visio 2010 Premium.&lt;/div&gt;&lt;b&gt; - Whats new in Shared Service Provider (SSP ) in Sharepoint 2010 ? ( Alt Q: What is "Service Application" ? )&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="padding-left: 20px;"&gt;“Service Application” or “Service App” is a concept in Sharepoint 2010, where SSP Services are split out into separate services.&lt;br /&gt;
&lt;u&gt;What is replaced :&lt;/u&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Profiles, Audiences = People Service App &lt;/li&gt;
&lt;li&gt;Search = Search Service App &lt;/li&gt;
&lt;li&gt;Excel = Excel Service App &lt;/li&gt;
&lt;/ul&gt;&lt;u&gt;Whats new : &lt;/u&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Project Server = Project Server App &lt;/li&gt;
&lt;li&gt;Visio Services = Visio Service App &lt;/li&gt;
&lt;/ul&gt;&lt;u&gt;Advantages : &lt;/u&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Web applications can be configured to only use a subset of the deployed services.&lt;/li&gt;
&lt;li&gt;You can deploy multiple instances of the same service in a farm by giving the new service instances unique names.&lt;/li&gt;
&lt;li&gt;You can share services across multiple web applications in a farm.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;u&gt;Ref : &lt;/u&gt;&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/uksharepoint/archive/2009/10/21/sharepoint-2010-new-shared-services.aspx"&gt;http://blogs.msdn.com/uksharepoint/archive/2009/10/21/sharepoint-2010-new-shared-services.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://aknauer.blogspot.com/2009/11/sharepoint-2010-advantages-of-service.html"&gt;http://aknauer.blogspot.com/2009/11/sharepoint-2010-advantages-of-service.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.andrewconnell.com/blog/archive/2009/10/19/the-new-service-application-architecture-in-sharepoint-server-2010.aspx"&gt;http://www.andrewconnell.com/blog/archive/2009/10/19/the-new-service-application-architecture-in-sharepoint-server-2010.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.andrewmilsark.com/blog/post/2009/10/20/SharePoint-2010-Service-Applications-%28Shared-Services%29-Overview.aspx"&gt;http://www.andrewmilsark.com/blog/post/2009/10/20/SharePoint-2010-Service-Applications-(Shared-Services)-Overview.aspx&lt;/a&gt;&lt;/div&gt;&lt;table width="100%" style="border-bottom-style:solid; border-width: 0 0 1px 1px; font-size:14px; font-weight:bold; color:blue;"&gt;&lt;tr&gt; &lt;td align=left width=15%&gt;&lt;&lt; Previous&lt;/td&gt;&lt;br /&gt;
&lt;td align=center style='white-space:nowrap;'&gt;&lt;br /&gt;
&lt;a href='http://manomangaldas.blogspot.com/2008/01/moss-2007-sharepoint-interview.html'&gt; 1 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview.html'&gt; 2 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_07.html'&gt; 3 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_9160.html'&gt; 4 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_13.html'&gt; 5 &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview_7760.html'&gt; 6 &lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;&lt;br /&gt;
&lt;td align=right width=15%&gt;&lt;a href='http://manomangaldas.blogspot.com/2010/02/sharepoint-2007-moss-interview.html'&gt; Next &gt;&gt; &lt;/a&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-7387482278453203924?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/7387482278453203924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7387482278453203924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/7387482278453203924'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/sharepoint-server-2010-interview.html' title='Sharepoint 2010 Interview Questions'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-3028845049038200005</id><published>2009-11-17T20:23:00.000-08:00</published><updated>2010-07-14T20:34:29.709-07:00</updated><title type='text'>Include jQuery ( custom js and css ) file to Sharepoint</title><content type='html'>It is often required to add custom js files or css files across the site collection. To achieve this we will have to include the script tag in the master page, which means modifying the master page or creating a new custom master page with the script tag included.&lt;br /&gt;
&lt;br /&gt;
There is one other way where there is no need for modifying the master page.. that is using Sharepoint &lt;b&gt;delegate control&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
Suppose we want to include the jQuery js file to be used in sites, we would be targeting the delegate control with the controlid 'AdditionalPageHead'&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Begin by creating a class project.. with the folder structure to mimic the 12 hive for easy packaging ( An excellent video on how to package up your project for MOSS is &lt;a href="http://msdn.microsoft.com/en-us/library/cc441431.aspx"&gt;here&lt;/a&gt; )&lt;/li&gt;
&lt;li&gt;Include an ascx file to the project. (refer &lt;a href="http://manomangaldas.blogspot.com/2009/11/visual-studio-2005-how-to-enable-web.html"&gt;this article&lt;/a&gt; on how you can achieve this with VS 2008)&lt;/li&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/Swk-i1MuwYI/AAAAAAAAAag/YCLJttOBHNA/s1600/JQ_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/Swk-i1MuwYI/AAAAAAAAAag/YCLJttOBHNA/s320/JQ_1.png" yr="true" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;li&gt;Delete the codebehind files which is not necessary in this case. remove the codebehind attribute in the control directive and set the inherits attribute with the proper value &lt;/li&gt;
&lt;li&gt;Include the script tag in this control&lt;/li&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_g-JN_WB_wo4/Swk-vckSY4I/AAAAAAAAAao/HPheDPNdiN8/s1600/JQ_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_g-JN_WB_wo4/Swk-vckSY4I/AAAAAAAAAao/HPheDPNdiN8/s640/JQ_2.png" yr="true" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;li&gt;feature xml is straight forward, element xml needs to include the 'Control' node. Set the sequence to '1'&lt;/li&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_g-JN_WB_wo4/Swk-2_He3xI/AAAAAAAAAaw/6WI8H6zm1n4/s1600/JQ_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_g-JN_WB_wo4/Swk-2_He3xI/AAAAAAAAAaw/6WI8H6zm1n4/s640/JQ_3.png" yr="true" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_g-JN_WB_wo4/Swk-64-Hi3I/AAAAAAAAAa4/D7iKuxpk-JU/s1600/JQ_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_g-JN_WB_wo4/Swk-64-Hi3I/AAAAAAAAAa4/D7iKuxpk-JU/s640/JQ_4.png" yr="true" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;li&gt;Package and deploy the solution. Activate the feature at site collection level&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Now to test it..&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Add a Content editor webpart in any page in the site collection&lt;/li&gt;
&lt;li&gt;Add the following script &lt;br /&gt;
&lt;pre class="brush: csharp"&gt;&amp;lt;script type="text/javascript"&amp;gt;
     $(document).ready(function(){
         alert("jQuery calling");

     });
     
   &amp;lt;/script&amp;gt;
&lt;/pre&gt;If you are not aware of the syntax of jQuery, no worries, it is just going to show a dialog box when the complete page is loaded.&lt;br /&gt;
&lt;/li&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_g-JN_WB_wo4/Swk_B0ypeiI/AAAAAAAAAbA/ctmMWaXLhnU/s1600/JQ_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_g-JN_WB_wo4/Swk_B0ypeiI/AAAAAAAAAbA/ctmMWaXLhnU/s400/JQ_5.png" yr="true" /&gt;&lt;/a&gt;  &lt;/div&gt;&lt;li&gt;Save and exit edit mode. You should see that dialog box with the message 'jQuery calling'&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Importance of Sequence&lt;br /&gt;
The Sequence attribute basically tells SharePoint the order in which to process multiple controls. To understand how this works, consider having two features that both add content to the same DelegateControl. Now, a DelegateControl in a SharePoint page can set the AllowMultipleControls to True, in which case both the features’ content gets added, with the feature with the lowest Sequence attribute added first. The AdditionalPageHead DelegateControl is an example of a control that allows multiple controls to be added, and it is the only DelegateControl that allows this in the default.master that ships with SharePoint.&lt;br /&gt;
&lt;br /&gt;
If the DelegateControl does not set the AllowMultipleControls to true, the only the feature with the lowest Sequence attribute gets added at all. The other features will not have their content added. This means that when you add a control to a DelegateControl you need to know which features have deployed content to the same DelegateControl, if any.&lt;br /&gt;
&lt;br /&gt;
The AdditionalPageHead is a really useful DelegateControl. It is located inside the HEAD section of the default.master and it has the AllowMultipleControls set to True. This means we can add all sorts of goodies to the head using a feature.&lt;br /&gt;
&lt;br /&gt;
Download complete code &lt;a href="http://www.4shared.com/file/155090213/57c04374/AddCustomJStoSharepoint.html"&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ref : &lt;a href="http://msdn.microsoft.com/en-us/library/ms470880.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms470880.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-3028845049038200005?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/3028845049038200005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/include-jquery-file-to-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3028845049038200005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/3028845049038200005'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2009/11/include-jquery-file-to-sharepoint.html' title='Include jQuery ( custom js and css ) file to Sharepoint'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_g-JN_WB_wo4/Swk-i1MuwYI/AAAAAAAAAag/YCLJttOBHNA/s72-c/JQ_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5285230663251728127.post-691519552452657210</id><published>2009-10-28T05:26:00.000-07:00</published><updated>2010-01-08T09:44:30.863-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010'/><title type='text'>SharePoint 2010 resources reference</title><content type='html'>&lt;strong&gt;Developer:&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Prepare yourself for 2010 - must read&lt;br /&gt;
&lt;a href="http://www.sharepointnutsandbolts.com/2009/10/sp2010-developer-skills-preparation.html"&gt;SP2010 – developer skills preparation ( Chris O'Brien )&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SharePoint 2010: Getting Started with Development on SharePoint 2010 Hands-on Labs in C# and Visual Basic&lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=C010FC68-B47F-4DB6-B8A8-AD4BA33A35C5&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=C010FC68-B47F-4DB6-B8A8-AD4BA33A35C5&amp;displaylang=en&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sharepoint 2010 Beta Developer Training Kit&lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=BFD1603B-7550-4B8E-BE85-4215A5069B90&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=BFD1603B-7550-4B8E-BE85-4215A5069B90&amp;displaylang=en&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;strong&gt;Administrator:&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://blah.winsmarts.com/2009-11-SharePoint_2010_Development_Environment_-and-ndash;_Practical_Tips.aspx"&gt;SharePoint 2010 Development Environment – Practical Tips&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;strong&gt;Videos:&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Getting Started Building Web Parts in Sharepoint 2010&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/ee513148.aspx"&gt;http://msdn.microsoft.com/en-us/sharepoint/ee513148.aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;channel9 SharePoint 2010 Developer videos&lt;br /&gt;
&lt;a href="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/"&gt;http://channel9.msdn.com/learn/courses/SharePoint2010Developer/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WSSv4 webcasts&lt;br /&gt;
&lt;a href="http://wssv4faq.mindsharp.com/Lists/v4WebCasts/AllItems.aspx"&gt;http://wssv4faq.mindsharp.com/Lists/v4WebCasts/AllItems.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;strong&gt;Other Resources&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;WSSv4 FAQ&lt;br /&gt;
&lt;a href="http://wssv4faq.mindsharp.com/default.aspx"&gt;http://wssv4faq.mindsharp.com/default.aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SharePoint 2010: Professional Developer Evaluation Guide and Walkthroughs&lt;br /&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cffb14e8-88a9-43bd-87aa-4792ab60d320&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=cffb14e8-88a9-43bd-87aa-4792ab60d320&amp;displaylang=en&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;strong&gt;Other Stuff&lt;/strong&gt;&lt;br /&gt;
&lt;li&gt;Architecture guidance for building applications in SharePoint 2010 ( Mike Ammerlaan )&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5285230663251728127-691519552452657210?l=howtosharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://howtosharepoint.blogspot.com/feeds/691519552452657210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://howtosharepoint.blogspot.com/2009/10/sharepoint-2010-resources-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/691519552452657210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5285230663251728127/posts/default/691519552452657210'/><link rel='alternate' type='text/html' href='http://howtosharepoint.blogspot.com/2009/10/sharepoint-2010-resources-reference.html' title='SharePoint 2010 resources reference'/><author><name>Mano Mangaldas</name><uri>http://www.blogger.com/profile/04463010398183548997</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp2.blogger.com/_g-JN_WB_wo4/R7kCOZMeYzI/AAAAAAAAAI8/if8BXNJWQm0/S220/me.jpg'/></author><thr:total>0</thr:total></entry></feed>
