Changing base view type on MVC4
I've read a post about changing base view type on MVC from the link below: http://haacked.com/archive/2011/02/21/changing-base-type-of-a-razor-view.aspx I followed the instructions but my page still inherits from System.Web.Mvc.WebViewPage . I can't reach any property defined in my custom view base and I get an error on runtime. When I use @inherits keyword, it fixes. Web.config <pages pageBaseType="[MyNamespace].WebViewPageBase"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /