I'm attempting to do what Scott Hanselman describes below:
http://www.hanselman.com/blog/MixingRazorViewsAndWebFormsMasterPagesWithASPNETMVC3.aspx
I have a Web Form user control with code behind that is called from the Web Form and Razor Master Pages that is not working in the Razor layout:
<div id="navtop">
@{ Html.RenderPartial("~/Controls/MasterPageMenu.ascx"); }
</div>
The user control contains the following:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MasterPageMenu.ascx.cs" Inherits="Controls.MasterPageMenu" %>
I get the error: The view at '~/Controls/MasterPageMenu.ascx' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.
What have I missed in getting this to work in the Razor view world?