Reputation: 1141
I am trying to implement a strongly typed master page and using this page as an example:
How to create a strongly typed master page using a base controller in ASP.NET MVC
I have the following declaration in my masterpage:
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<InsTech.ForeSight.Web.Mvc.ModelBase>" %>
When I try to run I get:
Parser Error Message: Could not load type 'System.Web.Mvc.ViewMasterPage<InsTech.ForeSight.Web.Mvc.ModelBase>'
I am not really sure why it can't find the type. When I use the ViewMasterPage class everything is okay, but when I try to use the generic version it bombs.
Any Suggestions
Upvotes: 4
Views: 1999
Reputation: 10267
I got this error when my MVC Master page was outside the 'Views' folder (with my normal Web forms master pages), moving it there solved this error for me.
Edit: Sorry I didn't see @Whoiskb already posted the same answer in the comments up there. Just leaving this answer for people who don't read all the comments :)
Upvotes: 0
Reputation: 12206
Is InsTech.ForeSight.Web.Mvc.ModelBase in another assembly? if so, is it referenced?
Is InsTech.ForeSight.Web.Mvc.ModelBase abstract?
Upvotes: 4