title: Error:Type 'ASP._Page_views_index_cshtml' does not inherit from 'System.Web.UI.Page'
body: <p>I had Asp.net web forms app, I want to convert it to responsive and to use Angularjs instead of web forms.</p>
  
  <p>I started by adding two razor partial views:</p>
  
  <ol>
  <li>views/login/login.cshtml </li>
  <li>views/index.cshtml</li>
  </ol>
  
  <p>Both views are pure html, except for rendering css/js</p>
  
  <p>I also added to the routing:</p>
  
  <pre><code>routes.MapWebPageRoute("Login", "mobile/login", "~/views/login/login.cshtml");
  routes.MapPageRoute("mobile", "mobile", "~/views/index.cshtml");
  </code></pre>
  
  <p>Now, when navigating to <code>mobile/login</code> will render with no problem, but navigating to <code>mobile</code> will give me the following error:</p>
  
  <blockquote>
    <p>Type 'ASP._Page_views_index_cshtml' does not inherit from 'System.Web.UI.Page'.</p>
  </blockquote>
  
  <p><img src="https://content.screencast.com/users/Karma.mania/folders/Jing/media/ba246d41-d1ba-4531-9537-253d28ca8a02/2015-06-07_1823.png" alt="error details"></p>
  
  <p>I tried adding to <code>index.cshtml</code> the following:</p>
  
  <pre><code>@inherits System.Web.Mvc.WebViewPage
  </code></pre>
  
  <p>But got the same error!</p>
  
  <p>Note: I don't have <code>&lt;system.web.webPages.razor&gt;</code> or <code>&lt;sectionGroup name="system.web.webPages.razor"&gt;</code> in my web.config</p>
  
  <p>Any ideas?</p>