Create sub site programmatically in SharePoint 2010

13. April 2011 03:14 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (4)
Sometime we require creating a sub site programmatically in code. Here is the simple way you can create a sub site programmatically. (SPSite site = new SPSite(http://siteCollectionUrl))   { using (SPWeb web = site.OpenWeb())         {try &nbs... [More]

Modify web.config settings on feature activation in SharePoint

13. April 2011 02:14 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (1)
In SharePoint 2010 there is a way to modify web.config settings file. You need to use SPWebConfigModification class which is a part of Microsoft.SharePoint.Administration namespace. This class allows us to register entities dynamically. Adding new settings in web.config I am going to use SPWebModi... [More]

Embed YouTube video in SharePoint 2010

4. April 2011 03:16 by Rashid Aziz in Sharepoint blogs  //  Tags:   //   Comments (8)
Some time you need to add YouTube videos in your SharePoint site pages, it is very simple to implement. I’m going to show step by step how to embed YouTube videos in SharePoint 2010 site, using content editor web part. 1.   Go to YouTube video which you want to embed and copy the v... [More]

Using join with CAML in SharePoint development

29. March 2011 09:09 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (2)
You can use the SPQuery.Join property in CAML to querying SharePoint lists data.   The each join is represented by a join element (which is child of Joins element). You can use joins to join multiple lists or use multiple joins to the same list.   Example: I am going to show you how to ... [More]

How to setup auto site deletion feature of SharePoint 2010

25. March 2011 09:07 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (1)
Step by step procedure to set SharePoint up to automatically cleans out unused sites: Step # 1: Central admin   navigates to    Application Management -----> Site Collections ------> Confirm site use and deletion  Step # 2: Choose Web Application&nb... [More]

SharePoint 2010 Server Name and Alternate Access mapping

25. March 2011 07:57 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (1)
The “Server Name” mapping and “Alternate Access” mapping are two features of SharePoint which provides to alter the URL’s returned in search results. A very common practice is used by different companies is “Internal” and “External” users. These ... [More]

Create meeting workspace pages programmatically in SharePoint

25. March 2011 05:43 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (3)
You can add meeting workspaces pages with the SharePoint UI and also manage them. It is also possible that you can create workspace pages programmatically. Here is the code to do this. Add the following references using Microsoft.SharePoint; using Microsoft.SharePoint.Meetings; //Code: strin... [More]

Web analytics service application provisioning in SharePoint 2010

25. March 2011 04:14 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (2)
Hi, I am going to show you that how to provision web analytics service application in SharePoint 2010. To accomplish this task you need to follow these steps 1.   Open SharePoint 2010 “Central Administration” site. 2.   Under “Application Management” se... [More]

Activate hidden Site Directory template in SharePoint 2010

20. March 2011 14:49 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (1)
If you are working with SharePoint 2010 enterprise features, You probably know that the Site Directory template is missing, The site directory is hidden because of compatibility issue while upgrading between SharePoint 2007 to 2010. I will show you the workaround to enable it. 1.   Brows... [More]

Installing collaboration portal template in SharePoint 2010

20. March 2011 09:40 by Rashid Aziz in Sharepoint blogs  //  Tags: ,   //   Comments (2)
Today I am going to show you how to install Collaboration Portal template in SharePoint 2010. This template is part of SharePoint Server (MOSS) 2007. Unfortunately in SharePoint 2010 this template has been removed. There are several templates that have been removed in SharePoint 2010, some of the t... [More]