Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Dec 13, 2007 06:08 AM|LINK
I've successfully created .aspx view pages without code behind by replacing the first line with this:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
However, trying to change it to inherit the generics to get typed view data like the following doesn't seem to work:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcApplication.Models.MyModel>" %>
Is there some trick I'm missing here? Can you not use a generic class in the Inherits attribute?