I have Asp.Net MVC Web application with form. When I submit form app runs method:
[HttpPost]
public ActionResult MyMethod(MyViewModel model)
{
FileStreamResult document = CreateDocument(model);
return document;
}
And browser opens generated file (PDF) in the same tab. I'm doesn't want to open this file, instead I want to download it to disk. How to implement this action?