I have a link on my page on click of which I am trying to generate a PDF document and then show the \"Open - Save\" prompt on the browser.
My HTML (reactjs component
Create Content Disposition and add it to your response header
var cd = new System.Net.Mime.ContentDisposition
{
// for example foo.bak
FileName = System.IO.Path.GetFileName(fileName),
// always prompt the user for downloading, set to true if you want
// the browser to try to show the file inline
Inline = false,
};
Response.AppendHeader("Content-Disposition", cd.ToString());