Why is a null parameter being passed to the following controller action?
public FileContentResult GetImageForArticle(ArticleSummary article)
{
if (article == null || !article.ContainsValidThumbNail()) return null;
return File(article.ThumbNail, article.ThumbNaiType);
}
from the following partial view:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<AkwiMemorial.Models.ArticleSummary>>" %>
<%if (Model.Count() > 0)
{ %>
<table>
<% foreach (var item in Model)
{ %>
<tr>
<td>
<img src='<%=Url.Action("GetImageForArticle", "Resources", new { article = item })%>' alt=""/>
</td>
</tr>
<% } %>
</table>