In the views, I go through a strongly typed model of the method as follows:
System.Web.Mvc.ViewPage<HomeModel>
And then just use it:
<%= Model.Greeting %>
How could a heavily typed model be used in a layout?
Without strict input, I will probably add the necessary data to the factory controller, and then use it via (LayoutModel) Viewdata ["LayoutModel"]). Tralala, but I'm looking for a better way.
Arnis lapsa
source share