如何在开始下载后重定向新页面 [英] How redirect new page after start downloading
本文介绍了如何在开始下载后重定向新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在开始下载文件后重定向到我的网站主页如何重定向请告诉我..
我用下面的代码下载文件并打开我的网站主页,文件正在下载但是
开始下载文件后我的网站没有打开。
Response.ContentType = application / octet-stream;
Response.AppendHeader( Content-Disposition, attachment; filename = Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf);
Response.TransmitFile(Server.MapPath( 〜/ LandingPages / img / Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf 跨度>));
Response.End();
解决方案
请按照我之前的回答 - 如何在Response.TransmitFile 之后调用Response.Redirect [ ^ ]。
Hi,
I want to redirect to my website homepage after start of downloading the file how to redirect please tell me..
I am using below code for download file and open the my website homepage , file is downloading but
after start of downloading file my website is not opening.
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf");
Response.TransmitFile(Server.MapPath("~/LandingPages/img/Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf"));
Response.End();
解决方案
Please follow my previous answer - how to call Response.Redirect after Response.TransmitFile[^].
这篇关于如何在开始下载后重定向新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文