Adding a Code-Behind for SharePoint 2010 Master Page using Visual Studio 2012

Too often we land in scenarios, where we require the flexibility to handle common logic in SharePoint  that requires wiring a code behind for the SharePoint 2010 MasterPage, which is never a straightforward and easy step to perform.

In this article, let’s look at the steps to add a code-behind file to a SharePont 2010 MasterPage, using the SharePoint templates available in Visual Studio 2012 IDE.

Continue reading

6,511 total views, no views today

Show / Hide SharePoint 2010 Ribbon based on Permissions / Privileges

A very common requirement in SharePoint 2010 is to hide the Ribbon control when exposing the site for external users.  It can be easily achieved by using the below code in the master page.  Open the SharePoint site in SharePoint Designer and navigate to  _catalogs/masterpage/v4.master.   Since I am using the V4 master as the default for my site, I can include the below code to hide the ribbon control from being visible to external users who doesn’t possess the “AddAndCustomizePages, ManageLists” permission.

Continue reading

2,758 total views, no views today

Windows Workflow Foundation (WWF) Interview Questions

1. What are the different ways to host workflows in .net?
Workflows can be hosted in any of the following applications and will require reference to the System.Activities DLL.

  1. Console Application
  2. Windows Forms Application
  3. Windows Services
  4. ASP.NET Application
  5. WCF Application

2. Name the different life-cycle events for a workflow?

  1. Completed
  2. OnUnhandledException
  3. Aborted
  4. Idle
  5. PersistableIdle

Continue reading

2,464 total views, no views today