Easy hiding content in debug mode with the SiteModeTrimmedControl

While working on an Internet-facing website at some point you might include some code which should be executed only when in production. Probably the most common example of such code are web analytics tracking codes. The last thing you want is to make web analytics count a visit every time you hit F5 on your development machine. Find out how to deal with it other than disabling the Internet connection on your development machine.

Automatically publishing files provisioned with Sandboxed Solutions

Sandboxed Solutions are a new capability of SharePoint 2010 that make it possible to run custom code in a safe manner. The Sandbox isolation has unfortunately some trade offs and consequences, one of which is the fact the every file you provision with a Sandboxed Solution is checked out by default. Find out how you can work around this default behavior and automatically check in all your files without too much manual effort.

Inconvenient ASP.NET cookies

Recently I’ve been working on a SharePoint solution that was persisting some state information. Originally this solution was relying on Session State but because of some extra configuration complexity that using Session State with SharePoint requires we decided to replace the Session State with cookies. Although both approaches are not exactly the same they were both sufficient in the scope of the solution. And although you might expect no rocket science when working with ASP.NET cookies there are a few things that keeping in mind might save you some painful hours.

Inconvenient Content Query Web Part and provisioning it to the right place

Content Query Web Part is one of the most frequently used Web Parts available out of the box with SharePoint Server 2010. Thanks to its flexibility, great performance and rich configuration possibilities it’s a great solution for aggregating content. Because the presentation layer of the CQWP is based on XSLT, the possibilities are virtually unlimited, but as soon as you start using custom XSLT stylesheets some strange things start to happen.

Mavention Activate Selected Features v1.1

Mavention Activate Selected Features is a custom extension for the new Visual Studio 2010 SharePoint Developer Tools that allows you to select which Features should be activated when deploying the Solution in Visual Studio.