CSharp


[SharePoint 2013] Restore the Breadcrumb (Navigate Up) Navigation

Update: I have packaged this solution up in a SharePoint solution. You can get the packaged solution and the source code here: [SharePoint 2013] Restore the Breadcrumb (Navigate Up) Navigation Part 2. SharePoint 2010 had a breadcrumb feature on the ribbon that would let a user navigate up the breadcrumb. In SharePoint 2013, this feature […]

[SharePoint 2010] Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.

I was working on a WCF web service that is hosted by SharePoint 2010 that provisions a users My Site and I kept getting this error message when trying to run the service: In searching the issue, I found a workaround on the MSDN forums that works quite well: set the current HttpContext to null. […]

[SharePoint 2013] Adding Links to the Suite Bar (Newsfeed, SkyDrive, Sites) By Overriding the SuiteLinksDelegate Delegate Control

SharePoint 2013 features a new set of links called the Suite Bar Links that are displayed in the top right corner of every SharePoint page. By default these links include “Newsfeed”, “SkyDrive”, and “Sites”. When first seeing this links my first thought was “how do I change them?”. In exploring the master page, we can […]

[PowerShell] Using Common Verbs for Custom PowerShell Cmdlets in C#

In my previous post, [PowerShell] Write a Custom PowerShell Cmdlet in C#, I mentioned that the commond verbs built-in to PowerShell should be used whenever possible. Here is a listing of all of the common PowerShell verbs available in PowerShell 2.0: VerbsCommon Add Clear Close Copy Enter Exit Find Format Get Hide Join Lock Move […]

[PowerShell] Write a Custom PowerShell Cmdlet in C#

Particularly with SharePoint 2010, I have become a huge fan of Microsoft PowerShell. In addition to writing complex PowerShell scripts (.ps1 files), I have found it very useful to write my own C#-based PowerShell Cmdlets to use in my scripts. This basic tutorial illustrates how to create a basic PowerShell Cmdlet with a couple of […]

[SharePoint 2010] Specifying Which Server a Custom Timer Job Will Run On

By default timer jobs in SharePoint are scheduled for all servers in a SharePoint farm and whichever server picks up the job first is the one that runs it. There may be times when creating a custom timer job for SharePoint 2010 that you want to specify the server in the farm that the timer […]

[ASP.NET / LINQ] Access GridView DataItem Properties of Anonymous Types

I tend to use LINQ for just about everything I can. Many times this involves populating ASP.NET GridViews from code with anonymous types from LINQ. For example: The issue that I came across is that when I need to access data from that query during an OnRowDataBound event. When trying to access the item using […]