Once you’ve installed the MVC framework, there are two different types of Master Pages you can add to a project: the original Web Forms Master Page, and the new and improved ‘MVC View Master Page’.  You can use either one in an MVC application, but it’s highly recommended that you use the new MVC View Master Page in your projects:

image

The improved MVC version comes with MVC-related capabilities that you won’t get with a Web Forms version.  Of those numerous capabilities, some of the important ones are:

  • Support for typed Models
  • Ajax, Html, and Url Helpers
  • No default code-behind

If you already have existing Web Form Master Pages, you can change them to MVC View Master Pages by changing the inherits attribute of the Master Tag:

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

Typically you’ll have a CodeBehind attribute with a Web Form Master Page, and it’s perfectly acceptable to leave it in there ( assuming you have custom code in that file ).

- Colin