ASP.NET MVC: Redundant (strongly typed) views in CRUD areas.
- by UpTheCreek
In the CRUD areas of my MVC app I have lots of seemingly pointless view files, such as:
<%@ Page Title="" Language="C#" MasterPageFile="Some.Master" Inherits="System.Web.Mvc.ViewPage<SomeModel>" %>
<asp:Content ID="ContentID" ContentPlaceHolderID="SomePlaceHolder" runat="server">
<%= Html.DisplayForModel() %>
</asp:Content>
This is of course pretty unDRY.
Is it possible to use a shared view for this while at the same time preserving the Strong Typing? (e.g. by specifying the generic type in the controller?)