Category Archives: .NET

Minimalist’s build script for ASP.NET projects

When deploying ASP.NET web sites you have a number of options ranging from full blown (up) MSI installers, MSDeploy or the KISS option: xcopy deployment. If the target IIS set up this is a very clean way to redistribute your application. First download a 7za.exe archiver and put it in your solution root. Then create a [...]

SharePoint List Performance (or how I saved 94%)

In a recent performance test session, I had created a thousand documents in a document library. They all had a 20 custom metadata fields filled out with data. The unit under test read all this data along with the common file information like this: SPUser user = listItem.File.CheckedOutByUser; result.CheckedOutBy = user != null ? user.LoginName [...]

DecoratorStream

In scenarios where you want to extend functionality of a simple System.IO.Stream instance, it is convenient to have a decorator. Neither the original stream or the client instance will have to know anything about the extension as it is still just a Stream. This can be used to add position tracking or to manage lifetime. [...]

Getting the name attribute of an MVC Html-helper output

It seems odd there is no standard way of getting the name of a control rendered with the Html helper extensions in MVC3 Razor. I saw some proposed solutions, but none of the actually worked e.g. in partial views or list binding. This solution gets it right, but is nonetheless just another hack. You can [...]

ProcessItems UX pattern

Here’s a general implementation for the common UX scenario where a items in a list should be processed, and that processing might fail, so reprocessing might be needed for those items. This used e.g. when copying a bunch of files or collecting data from loosely connected distributed systems. /// <summary> /// General UX process pattern [...]

Follow

Get every new post delivered to your Inbox.