I want to add download button in webgrid which individually downloads the file on that row in MVC.
Thanks in advance..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Saineshwar BageriPosted Jan 16, 2017, 1:06 AM
rowStyle: "gridrow",
alternatingRowStyle: "gridalt",
columns: grid.Columns(
grid.Column("ApplicationNo", header: "Application No"),
grid.Column(columnName: "DownLoad Receipt", format: (item) => Html.ActionLink("DownLoad", "ActionMethod Name", "Controller Name",
new { ApplicationID= item.ApplicationNo }, null))
))
Any Parameter to pass (String Application)
public ActionResult DownloadRecipt(string ApplicationID)
{
return File(DocDownload.Document, DocDownload.ContentType, DocDownload.FileName);
}
S PPosted Jan 16, 2017, 12:32 PM