Your views may be poorly displayed ... Your initial directive on the page will look like this:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
... and then you can reference data from your controllers, for example:
<%= ViewData["MyData"] %>
Is there some kind of common interface that you are going to convey to your view? If so, you can take advantage of using the generic ViewPage <>:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IamTheInterface>" %>
Then you can use your interface to reference your model:
<%= Model.MyProperty %>
source
share