读书人

window.showModalDialog()弹出的窗口

发布时间: 2013-09-10 13:42:18 作者: rapoo

window.showModalDialog()弹出的窗口 里面有下载链接 如何让这下载好用
if (File.Exists(Server.MapPath(filePath)))
{
string strFileName = Path.GetFileName(filePath).Replace(" ", "%20");
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + strFileName);
Response.Clear();
Response.WriteFile(Server.MapPath(filePath));
Response.End();//到此行也不报错 ,就直接没反应了
}


window.showModalDialog()弹出的窗口 里面有下载链接 如何让这下载好用???求帮忙!!!
[解决办法]
你直接在模态对话框中加一个a标签

<a id="hi" onclick="loadFile()">abc</a>

然后在js里面这样写

function loadFile()
{
window.location = "filepath";
}

读书人网 >asp.net

热点推荐