我正在尝试在新的浏览器窗口中打开从数据库中下载的文件..
这是我尝试过的代码..
result = objBL.GetLetter(LetterID, refNo, attachmentType);
if (result != null && result.Rows.Count > 0)
{
DataRow dr = result.Rows[0];
string fileName = dr["FileName"].ToString();
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(fileName));
Response.WriteFile(Server.MapPath("~/Attachments/" + fileName));
Response.End();
}
是否有任何语法可以在 jquery 中打开?