I create a strong typed view ,but i can't get the Mode and viewdata and the Html... This is my sample code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MiniMain.ViewModel.ArticleViewdata>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%Model %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>ViewPage1</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="refereFiles" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Breadcrumbs" runat="server">
</asp:Content>
Remember to add this to your
web.configfile:The
pageParserFilterTypeattribute in particular will enable you to use the "generic" syntax to define the class from which your pages inherit. Otherwise, you'd have to use the standard way to specify generic base classes: