Visual Web Part SharePoint 2010 Tree View


Disable approval workflow for a publishing site in SP2010

Most of the times, When you request publishing site you may end up with publishing site with workflow. If you don't want the approval workflow for a publishing site then you can do the following two steps.

1.  Go to the Pages library settings and click on versioning settings and click “no”:
2.  Click workflow settings and remove the approval workflow:


SharePoint 2010 Browser Support

SharePoint Server 2010 works best with up-to-date, standards-based web browsers.

The following are supported browsers running on the Windows operating system:
  Internet Explorer 7 (32-bit)
  Internet Explorer 8 (32-bit)
The following are supported browser options with known limitations:
  Internet Explorer 7 (64-bit)
  Internet Explorer 8 (64-bit)
   Firefox 3.6 (32-bit) on Windows operating systems
   Firefox 3.6 on non-Windows operating systems
   Safari 4.04 on non-Windows operating systems


SharePoint Selected Links in a Links List Open in a New Window

If you want selected link in a links list or summary link in SharePoint follow the steps.

Step 1: Copy and paste the following code in your master page above the closing head tag and also replace the square bracket with anchor bracket.
                                                [script language="JavaScript"]

function rewriteLinks() {
     var anchors = document.getElementsByTagName("a");
     for (var x=0; x
          if (anchors[x].outerHTML.indexOf('#newwindow')>0)
oldText = anchors[x].outerHTML;
newText = oldText.replace(/#newwindow/,'" target="_blank');

               anchors[x].outerHTML = newText;

          } } }

Step 2: If you want selected link to open in a new window just type #newwindow after the url as shown  below.


Display PDF File in SharePoint

By using “Content Editor Web part” we can display PDF File in
SharePoint site.
  1. Add a “Content Editor Web part” to your SharePoint page.
  2. Click on the “Open the Tool Pane”, click on “Source Editor” to place the HTML source.
  3. Place the following piece of code in to the Source Editor and click ok
    src=”http://source/test.pdf” type=”application/pdf”>


SharePoint 2010 Ribbon scroll like a normal site!

Hi All,

    I got couple of emails regarding the scrolling issues with SharePoint 2010, One of them had issues with visitors unable to read the content which is available in the bottom of the page. so the best solution as follows:

  1. First thing you need to do is remove or change scroll=”no” to “yes” in the – this will make the page scroll conventionally.
  2. Next you need to remove or change the “s4-workspace” ID tag from line 293 (in v4.master).
  3. I usually just rename it to s4-workspaced so if you need to change it make, you can just remove the ‘d’
  4. Next you need to add some CSS either in a referenced custom stylesheet or directly in the masterpage. The CSS code is very simple it is - body {overflow:auto!important;}


Build dynamic string SPD workflow activity in Sharepoint 2010

Hi All, 

Build dynamic string SPD workflow activity in Sharepoint 2007 is no more directly available in SharePoint 2010. In order to activate you need to do the following activities.

Step 1: Navigate to \Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\1033\Workflow on your system drive

Step 2: Open the WSS.Actions file (this is where information about all default SPD actions is stored)

Step 3: Find "Build Dynamic String" and change the "AppliesTo" parameter from "DisplayOnly" to "all". Save the file

Step 4: Run IISReset, re-open SPD - you should now have the Build Dynamic String action available.


Hide column header in a SharePoint list web part

To remove these annoying headers I used a simple content editor web part. Open up the Source editor and enter the following three lines:
.ms-viewheadertr { display: none;}
Under Layout in the Content Editor Web Part check the “Hidden” check box so you’re web part wont’ be seen on your site and click OK.  The column headers will now be hidden from view.

This method can also be used to hide and/or change the look of other aspects of your SharePoint site without using SharePoint Designer or making any custom modifications.


How to Remove I like it -- Tags and Notes using SharePoint Designer

There are two ways to remove social tags i.e. I like it ---  Tags and Notes

1) go to central admin- Farm Management -- Manage Farm Features-- Deactivate Social Tags and Note Board Ribbon Controls, but it will impact all the web application.

2) using SharePoint Designer open the master page i.e. v4.master and add style="display:none" to the following code.
                                     class="s4-socialdata-notif" style="display: none"                                        SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"                                   



“You must specify a value for this required field” error when hidding PlaceHolderPageTitleInTitleArea

 Instead of commenting or deleting the following code

asp:ContentPlaceHolder ID="PlaceHolderPageTitleInTitleArea" runat="server

use style="display:none;" as follows

asp:Panel style="display:none;"

asp:ContentPlaceHolder ID="PlaceHolderPageTitleInTitleArea" runat="server" /



When customizing SharePoint 2010 MasterPages you often don’t want certain content placeholders to show up on the page.  You should not delete or comment these elements out but instead set the visible=”false”  or display:none attribute on the content placeholder.  



Add BCC Recipient in SharePoint Designer 2010 Workflow E-Mails

When you design your email in SharePoint Designer workflows, you do not get the opportunity to include blind carbon-copy recipients. Here is the initial screenshot:

In order to add BCC, you need to click Advanced Properties located in the ribbon UI:

This will launch a separate window where you can now set your BCC recipients.


How To Hide Ribbon From Visitors in SharePoint 2010

  •       Open your SharePoint master page
  •       Locate this line:
    <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
  •       Change it to: <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
  •       Now find the end of the “s4-ribbonrow” tag and add following block right after it:
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">    <script type="text/javascript">        document.getElementById("s4-ribbonrow").style.display = "block";
  •       Save the new master page and publish it.

SharePoint Designer 2010 will not allow non SharePoint Sites!!!

 SharePoint Designer 2007 allowed you to build and maintain a non-SharePoint site. In the 2010 version of SharePoint Designer you no longer have that option. In fact, SharePoint Designer 2010 will only connect to a SharePoint Server 2010 server.So, if you are developing with SharePoint you use SharePoint Designer. If you are doing just general disk based web-sites, you switch over to Expression Web.


Site Aggregator web part does not show new tab

As of Jan 26th 2011, there is no fix yet. 

It used to show new tab in 2007 but not in 2010

Site Aggregator web part: The site aggregator web part is actually a pretty simple web part – put it on a page and it can display all objects (images, documents, forms, excel spreadsheets) that have been added to any SharePoint site belonging to the same site collection as the one that the web part is deployed upon.
To configure it, you just enter the URL of the site that you want to display all the documents from, then give the link a name – this name then shows up as the name of the tab you click on to display the content from that site, so make it intuitive, eh! :)
So… under "Sites", click on the "New Sites Tab" – Enter in the URL and the tab name, then click Create.
New tab created, check!


Download Visual Studio 2010 Extensibility Projects for SharePoint 2010

There are three extensibility projects included in this Beta release (that target the SharePoint RC version):

1. Silverlight and SharePoint project template
2. SharePoint Ribbon project template
3. OBA Deployment project template
There are three extensibility projects included in this Beta release (that target the SharePoint RC version):


Datasheet View of list/library not supported when 64 bit of Office 2010 is used

By default, the Datasheet view of a list or library is not supported when you are using the 64-bit version of Microsoft Office 2010 installed on a 64-bit Windows operating system.

In order for Datasheet view to work download Data Connectivity Components driver.  These components are available on the Microsoft download center:
2007 Office System Driver: Data Connectivity Components

What to Install in Office 2010 64-bit or 32-bit?

Microsoft Office 2010 is the first version of office that will ship in both 32-bit (x86) and 64-bit (x64) flavors. If you are running a 32-bit version of Windows, you can only use a 32-bit version of Office. However, on x64 Windows, you can decide to install either 32-bit Office or 64-bit Office, but not both.
Microsoft recommendation is to install the 32-bit Office, even on 64-bit Windows.  Unless you have special needs that require the use of 64-bit Office apps.