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]
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]
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]
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]
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]
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]
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]
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]
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]
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]