I am able to request a file and also have it returned. I don´t know how to display a open/save dialog box.
View:
function saveDocument() {
$.ajax({
url: '/Operacao/saveDocument',
type: 'POST',
DataType: "html",
success: function (data) {
//I get the file content here
}
});
}
Controller:
public void saveDocument() {
Response.ContentType = "image/jpeg";
Response.AppendHeader("Content-Disposition", "attachment; filename=SailBig.jpg");
Response.TransmitFile(Server.MapPath("~/MyPDFs/Pdf1.pdf"));
Response.End();
}