with mvc.net partial view, how do i access the model assigned to the template
I have another simple question for all you mvc gurus.
I have a partial view with the following definition.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IList<whoozit.Models.Pictu开发者_如何学PythonreModel>>" %>
How do I access the data that has been assigned to the view?
You could do something like:
<% foreach (whoozit.Models.PictureModel picture in Model)
{ %>
<%: picture.property1 %><br />
<%: picture.property2 %><br />
etc...
<% } %>
精彩评论