Wednesday, February 22, 2012

custom timer job sharepoint 2010

Here we will see how we can create a custom timer job using visual studio 2010 for our SharePoint site. Here our first step is to create a empty SharePoint project. For this open visual studio 2010 then File -> New -> Project. From the New Project dialog box
select SharePoint -> 2010 and then select Empty SharePoint project as shown in the figure below. Give a name and click on OK.
In the next step give the local deployment url and select farm solution and click on Finish.

Friday, February 17, 2012

hide ribbon in sharepoint 2010

Ribbon is a great feature in SharePoint 2010, but some times it need to hide the ribbon from anonymous users. Here is a way by which you can hide the ribbon from anonymous users. This can be possible through Sharepoint:SPSecurityTrimmedControl control and some modifications in the master page and by using jQuery. If you want to read about Sharepoint:SPSecurityTrimmedControl, then visit this article. Also read some jQuery articles here.

Step-1:
First of all before modifying anything take a backup of your master page.

Step-2: 

Tuesday, February 14, 2012

SharePoint 2010 video tutorials

Here are some SharePoint 2010 get started video tutorials. This covers topics like:
  • Building web parts in SharePoint 2010 video tutorials
  • What you need to know about SharePoint 2010 video tutorials
  • Web part building blocks in SharePoint 2010 video tutorials
  • Server side data access in SharePoint 2010 video tutorials
  • Client object model in SharePoint 2010 video tutorials
  • Business connectivity services for SharePoint 2010 video tutorials

Sunday, February 5, 2012

Restore a Site Collection in SharePoint 2010

Before restoring a site collection, you can check this article on how to take backup of a site collection.

There are different ways that you can restore a site collection in SharePoint 2010 like stsadm, powershell.

Stsadm:
Here is the command to take backup of site collection:
STSADM -o restore -url -filename [-overwrite]

Example:
STSADM -o restore -url http://your-site-url -filename c:\backup\MySiteCollection.bak

PowerShell:
Here is the powershell command to restore a site collection.
Restore-SPSite -Path [-force]
Also there are lots of parameters of this command.

Example:
Restore-SPSite http://your-site-url -path c:\backup\MySiteCollection.bak [-force]

Difference between granular and farm backup in SharePoint

SharePoint 2010 provides two types of backup categories in SharePoint 2010. They are known as Granular and Farm.

Granular:
- Granular has two main types which are site collections and Web site or list.

- These backup mainly focuses on single content database.

- Granular backups are content backups that work on the site collection, website, or list level.

- These backups can be performed using Central Administration, STSADM, or PowerShell commands.

- But it is not recommended to run site collection backups if your site collection is larger than
around 15 GB.

Farm:
- These are bascially towards web farms and web application levels.

- These are basically into farm configurations, solution packages, web applications, service applications, whole content databases etc.

- These backups can be performed using Central Administration, STSADM, or PowerShell commands.

Friday, February 3, 2012

Create Page Layout using SharePoint Designer 2010

We can create page layout in SharePoint designer 2010 very easily. First open your site in SharePoint designer 2010 and then from the Site Objects section from the left side click on Page Layouts as shown in the figure below.
Then from the ribbon click on New Page Layout as shown in the figure below: