When to use TempData in ASP.NET MVC
The problem I came across this problem where I had a basic list of items and for each if these items I wanted to add a delete action on my controller. I wanted to add some error checking around the delete action so if someone attempted to modify the URL and enter a incorrect parameter [...]
Areas and ASP.NET MVC Routes Tip
Lets say that you have several areas define in your ASP.NET MVC solution. You find that when you run your application you get the following error “Multiple types were found that match the controller named ‘Home’.”. This is because ASP.NET MVC finds all the routing definitions (i.e in each area.cs file or the global.asax) and [...]
Elmah and MVC 3 Error Handling
I came into an issue where I have Elmah configured on a ASP.NET MVC 3 website. I notice that the errors were not getting logged or emailed as per my configuration settings in web.config. I found that MVC3 Error Handling was handling all the errors before Elmah could handle the error and report it correctly. [...]
handling multiple submit buttons in one form (asp.net webforms)
I came across an issue where I had the following setup with an asp.net website: I had a master page with one main form element I had a submit button in the master page which acts as a search button across the website I had a login page that also has a submit button Naturally [...]
Compiler Error Message: CS1973
I came across this error when I was trying to use the @Render method to render a view while passing through a object that will act as the model for that view. Compiler Error Message: CS1973: ‘System.Web.Mvc.HtmlHelper’ has no applicable method named ‘Render’ but appears to have an extension method by that name. Extension methods [...]
Disabling Request Validation with ASP.NET MVC
Sometimes when dealing with POSTS and form data, you need to disable Request Validation to allow HTML/scripting data into your methods. Traditionally with Web Forms you use <%@ Page ValidateRequest=”false” %> which turns off Request Validation, just be aware that this doesn’t work with ASP.NET MVC. You apply the [ValidateInput] attribute to the controller action [...]
A CMS that integrates into ASP.NET MVC
Here is a open source CMS called N2 that provides a CMS framework to build web applications on using the ASP.NET MVC Model. Its a very basic CMS, but it provides all the core functionality including Pages, Articles and a .NET Permissions Model (it also has some add ons and allows developers to contribute their [...]
Using ASP.NET MVC on IIS6 or below
When you are building a web applicatio using the ASP.NET MVC framework on IIS7, it URL routing works smoothly and without any dramas. But when it comes to IIS6 you have to make a comprimse especially if you are developing web apps within a shared hosting envoirnment. I found the easist way is to change [...]


