I have a controller on server side, and the method
public ActionResult GetBulletin()
{
return File(@"E:\Fileserver\022015.pdf", "application/pdf");
}
this is triggered when a user clicks on a link on the webpage, the document then is opened in a browser window. the link is
<a href="http://www.domain.com/File/GetBulletin">Download</a>
What i want to do is force the download, I read that we shall use the content disposition header, my question is how to have the server send this header?
Response.AppendHeader("Content-Disposition", @"attachment; filename=E:\Fileserver\022015.pdf");
return View() ;
doesn't work of course.thanks.