views:

30

answers:

1

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.PictureModel>>" %>

How do I access the data that has been assigned to the view?

A: 

You could do something like:

<% foreach (whoozit.Models.PictureModel picture in Model)
   { %>
    <%: picture.property1 %><br />
    <%: picture.property2 %><br />
    etc...
<% } %>
Forgotten Semicolon
aha, the keyword is Model. Thanks.
yamspog