Dec 13, 2007 06:08 AM|ghotiman|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?