quick question, I want to give the user the option to download all attachments from my details view.
This works for a single attachment...
@foreach (var file in Model.Attachments)
{
<div class="margin-bottom-25">
<a href="?">
<img src="~/Images/pdf.gif" /></a>
<div>
<strong>@file.FileName</strong>
<span>@file.FileSizeKB KB</span>
@Html.ActionLink("Download", "ViewDocument", new
{
messageId = file.MessageId.ToString("N"),
documentId = file.ID.ToString("N"),
documentType = file.AttachmentType.ToString(),
download = true
})
</div>
</div>
}
however I want to give the user the ability to select a "Download all" link....? Sounds straight forward, but I tried putting the foreach within the link and it's a none runner.....any ideas appreciated ? (asp.net MVC 4 application, using razor2 views)