ProxyApi: Now With Intellisense!
After announcing ProxyApi in my last post I had a few people suggest that it would be more useful if it included some kind of intellisense. So…now it does! Install the new ProxyApi.Intellisense NuGet...
View ArticleLocalising MVC Views using Display Modes
When considering localisation/globalisation/internationalisation of an MVC website there are a lot of routes you can take. The easiest of these (and therefore the most tempting) is to use a...
View ArticleKeeping MVC Views Tidy with a Base Class
I have recently been working on a site where localized values are pulled from a resource dictionary, with access to the localized values abstracted away behind an IResourceProvider interface like the...
View ArticleCustom Date Formats and the MVC Model Binder
Let’s say that you have a model with a DateTime property. public class Person { //... public DateTime DateOfBirth { get; set; } } Suppose that you want someone to fill out the details and post them...
View ArticleExcluding Current RouteData from UrlHelper
By default, the MVC UrlHelper will include all of the route values for the current route in it’s calculations. This means that unless you explicitly override them you can get situations like this:...
View ArticleHiding ProxyApi Routes from Web API Help Pages
If you are using ProxyApi and you have tried out the Web API Help Pages feature then you will have noticed a bunch of duplicate routes showing up for all of your actions that look something like this:...
View ArticleSingle Page Applications using Node & Knockout
This post is going to be a short walkthrough on how to use Node and KnockoutJS to create a simple single page application. What is a Single Page Application? …a web application or web site that fits on...
View ArticleExplicitly Controlling Cache Dependencies in MVC
In the past, I have always used the OutputCacheAttribute when I wanted to cache the result of an Action in my MVC application; it’s simple, and it gets basic caching up and running with very little...
View ArticleFallback Images with Knockout
After a busy few weeks at work I’ve finally managed to spend some time on knockout development again, and today I found a nice solution to a problem with data-bound images. In my example I had a list...
View ArticleProxyApi & Anti-Forgery Tokens
Anti-Forgery Tokens? Good question. Anti-forgery tokens are a recommended way of preventing one of the OWASP Top Ten security vulnerabilities: Cross Site Request Forgery, or CSRF. CSRF works on the...
View Article