Sending rich emails using RazorEngine – advanced templates

In my previous post, I’ve shown how to use the RazorEngine template engine in order to generate EmailMessages in an MVC-like pattern. However, when compared to real MVC, we have the ability to create more complex views, using utility classes/methods, such as @Html and @Url. In this article we’ll see how we can simulate that … Read more

Sending rich emails using RazorEngine

RazorEngine is a templating engine based on Microsoft’s Razor parsing engine. One of its most common uses it to generate HTML for emails. This post shows how to use the RazorEngine in a simple and elegant fashion. Let’s start with some basic code to create our MailMessage, which we will expand and build throughout this … Read more

Attaching debugger at runtime in .Net

Whenever you write code that starts a new Process, your debugging experience is rather lacking – you’re stuck outside of the debugger. The following extension method will attach the Visual Studio debugger to your process:

Bloomberg’s Billionaires – Part 2: General data and stats

In my previous post, I’ve mentioned Bloomberg’s Billionaires website, which displays detailed information about the Top 100 world billionaires. Today, let’s take a look at the data used by the website. Using Fiddler, we can browse to (http://www.bloomberg.com/billionaires/) and follow the AJAX requests performed by the page. The first interesting piece of information is a … Read more

Reactive Extensions goes Open Source

With Reactive Extensions going open-source, as mentioned in Scott Hanselman’s Reactive Extensions (Rx) is now Open Source post, I took a swing at the library, as it solved one of my requirements perfectly. Having the ability to buffer events (or subjects), and process them in chunks, while keeping a time-limit on the delay is extremely … Read more

NServiceBus, Sagas and events

In the last few weeks, I’ve been spending some time with NServiceBus, as part of my prototyping a new system we’re working on at work. The system encompasses quite a few moving parts, and using a Bus made sense. One of the expected services will be using the concept of Saga’s – long running processes. … Read more

LongPath and UNC paths

A colleague of mine started using the LongPath package provided as part of the Base Class Libraries project in CodePlex. This package seemed to be working just fine when trying to access local folders, both long and short. However, the provided code does not work with UNC paths – paths that are in the format … Read more

jQuery and MVC together – URLs resolving

Lately I’ve found myself working on a website, that is based on MVC3, and is using some jQuery. I found a beautiful template in ThemeForest.net – no shame in admitting I’m no designer. The first few steps of setting up a new MVC project, using the downloaded theme in the Layout.chtml file, and adding all … Read more

WinForms: ListView with Multi-lined tool-tips for SubItems

If you’ve worked with ListViews in WinForms before, you might have encountered the discouraging fact that the default ListView does not support multi-lined tool-tips for SubItems. For this to work, you have to create a custom control that inherits from ListView, and make some nasty calls to P/Invoke. Here’s how this can be achieved: As … Read more