trying to bring up save file dialog to download and save into local but it does not show up dialog with the following, not sure where it went wrong :
if (cbLocal.Checked)
{
string fileName = Session["previousinvcode"].ToString() + ".pdf";
filePath = Server.MapPath("~/Invoice2014/" + Session["previousinvcode"].ToString() + ".pdf");
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ";");
response.TransmitFile(filePath);
response.Flush();
response.End();
udpLocal.Update();
}
Go to the complete details ...