title: Mixing Razor Views and Web Forms Master Pages
body: <p>I'm attempting to do what Scott Hanselman describes below:</p>
  
  <p><a href="http://www.hanselman.com/blog/MixingRazorViewsAndWebFormsMasterPagesWithASPNETMVC3.aspx" rel="nofollow">http://www.hanselman.com/blog/MixingRazorViewsAndWebFormsMasterPagesWithASPNETMVC3.aspx</a></p>
  
  <p>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:</p>
  
  <pre><code>&lt;div id="navtop"&gt;
      @{ Html.RenderPartial("~/Controls/MasterPageMenu.ascx"); }
  &lt;/div&gt;
  </code></pre>
  
  <p>The user control contains the following:</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MasterPageMenu.ascx.cs" Inherits="Controls.MasterPageMenu" %&gt;
  </code></pre>
  
  <p>I get the error:
  The view at '~/Controls/MasterPageMenu.ascx' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.</p>
  
  <p>What have I missed in getting this to work in the Razor view world?</p>