用户单击文件下载对话框上的“确定"后,如何重定向到另一个页面? [英] how to redirect to another page AFTER the user clicks 'OK' on a file download dialog box?

查看:55
本文介绍了用户单击文件下载对话框上的“确定"后,如何重定向到另一个页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在asp.net 2.0中工作,希望当用户单击下载"按钮时,他/她被重定向到另一个页面,并在该页面上打开下载"对话框以下载文件,并且如果用户单击保存"按钮,它将开始下载.

这可能吗?

请告诉我!
谢谢你
@ Chetanv @

I am working in asp.net 2.0 and want that when user clicks on Download button he/she is redirected to another page and on that page download dialog box opens for downloading file and if user clicks on save button than it starts downloading.

is this possibly?

plz tell me!
thank u
@Chetanv@

推荐答案



像这样使用.

Hi,

Use like this.

protected void Button1_Click(object sender, System.EventArgs e)
{
   Server.Transfer("Page.aspx", true);

   // Code to download the file.
}


这篇关于用户单击文件下载对话框上的“确定"后,如何重定向到另一个页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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