下载完成后在asp.net中重定向到另一个页面 [英] Redirect to another page after downloading finished in asp.net

查看:68
本文介绍了下载完成后在asp.net中重定向到另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,



处理myProcess = Process.Start(startInfo);

myProcess.WaitForExit();

myProcess.Close();

objZip.AddFile(destinationFile,Files);

Response.Clear();

Response.AddHeader(Content-Disposition,attachment; filename =+ ApConfig.CurrentUser.FirstName +。+ ApConfig.CurrentUser.LastName +-actusdocs.zip);

回复.ContentType =application / zip;

objZip.Save(Response.OutputStream);

Response.End();

响应。重定向(AppraisalHistory.aspx?type = mid);



我想给弹出文件下载文件,还想将用户重定向到下一页。我确实理解我是否正在写回应。下一行不起作用..但有没有办法克服这种情况..当afterdoeanlod我可以重定向到下一行页面我想

Hii ,

Process myProcess = Process.Start(startInfo);
myProcess.WaitForExit();
myProcess.Close();
objZip.AddFile(destinationFile, "Files");
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + ApConfig.CurrentUser.FirstName + "." + ApConfig.CurrentUser.LastName + "-actusdocs.zip");
Response.ContentType = "application/zip";
objZip.Save(Response.OutputStream);
Response.End();
Response.Redirect("AppraisalHistory.aspx?type=mid");

I want to give popup to downalod the file and also want to redirect the user to next page ... i do understand if i am writing responce.end the next line doesnt work .. but is there any way to overcome this situtation .. when afterdoeanlod i can redirect to next page i want to

推荐答案

请参阅我之前的回答 - 如何在Response.TransmitFile 之后调用Response.Redirect [ ^ ]。
Refer my previous answer - how to call Response.Redirect after Response.TransmitFile[^].


这篇关于下载完成后在asp.net中重定向到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆