0

I have page with UpdataPanel and UpdateProgress on it. in this page I redirect to a download page that is responsible for downloading a generated file. Redirecting to download page occurs in UpdatePanel via one of controls click event. The problem is after downloading the file UpdateProgress does not disappear. (I set ContentType of my download page to proper mime type)

4

1 回答 1

0

我在更新面板的一个事件中找到了另一种下载文件的方法。我用 i 框架来做到这一点。onClick事件我iframe用我的文件地址将内联添加到页面中。

var script = @"
var iframe = document.createElement(""iframe"");
iframe.src = '{0}';
iframe.style.display = ""none"";
document.body.appendChild(iframe);";
ScriptManager.RegisterStartupScript(string.Format(script, url));

这解决了我的问题。

于 2013-04-27T04:15:52.223 回答