Enabling ASP.NET Session State in SharePoint 2010

To enable ASP.NET session state:

  1. Enter the following PowerShell command in the SharePoint 2010 Management Shell window:
    Enable-SPSessionStateService –DefaultProvision
  2. On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:
    <pages enableSessionState="true">

Grouping List By Content Type

Simple Task
Create a custom view on a SharePoint list grouping the items by Content Type

You just select Content Type from the Group By field list right? Eh, where is the Content Type field?  I’ve always been confused as to why this isn’t supported out the box by SharePoint but I guess there must be a good reason!?

Salvation is here though fellow SharePointers, you can achieve grouping by Content Type by using SharePoint Designer.  The simplest approach is to create your custom view in the SharePoint web interface and group on one of the available columns (Title, Modified, Created etc) and then save the custom view.  Open SharePoint Designer and navigate to your list, double-click your custom view from the Views list (see below).

Once the view is open in the editor, search for “<GroupBy>” which will take you to the GroupBy filter fields, change the current fieldname in the Name parameter of the FieldRef element to “ContentType” and click save

That’s it, a SharePoint list grouped by Content Type!  Easy when you know how.

NOTE: If you edit the view again via the web interface the customisation will be lost as there is no option in the Group By field list for ContentType.