title: Problem Using Partial View In for each loop
body: <p>I'm a little confused here, I am trying use a partial view in a for each loop like so</p>
  
  <pre><code>    &lt;% foreach (var item in (IEnumerable&lt;MVCLD.Models.Article&gt;)ViewData["LatestWebsites"]){%&gt;
      &lt;% Html.RenderPartial("articlelisttemaple", item); %&gt;
  &lt;% }  %&gt;
  </code></pre>
  
  <p>And my partial view looks like this</p>
  
  <pre><code>            &lt;div class="listingholders"&gt;
              &lt;h4&gt;&lt;%=Html.ActionLink(item.ArticleTitle, "details", "article", new { UrlID = item.UrlID, ArticleName = item.ArticleTitle.ToString().niceurl() }, null)%&gt; &lt;/h4&gt;
              &lt;p&gt;&lt;%= Html.Encode(item.ArticleSnippet) %&gt;&lt;/p&gt;
              &lt;div class="clearer"&gt;&amp;nbsp;&lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>But when I run the project I get told the partial view doesn't understand what item is??</p>
  
  <pre><code>CS0103: The name 'item' does not exist in the current context
  </code></pre>
  
  <p>I can't see why it would be doing this as I'm passing item into the partial view?</p>