Is it possible to share a masterpage between MVC and webforms?

You can absolutely share the same master page. Your MVC master page must simply point to the WebForms masterpage via its MasterPageFile attribute. This applies your WebForms MasterPage styles to your MVC MasterPage.

I am using this setup in production.

The declaration on my MVC Master Page, pointing at the Web Forms Master Page:

<%@ Master Language="C#" MasterPageFile="~/MasterPage/Site.Master"
AutoEventWireup="true" Inherits="System.Web.Mvc.ViewMasterPage" %>

Works like a charm.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)