//showModalDialog_1.aspx 新增一個iframe
//按鈕內容
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
String filename = hidden2.Value + "_" + hidden1.Value + ".xls";
Response.Write("<script language=javascript>window.location.href='download.aspx?check=true&filename="+ filename +"';</script>");
}
//download.aspx 的page_load加上以下內容
//(必須判斷網頁傳值,不然畫面會無限postback)
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["check"] == "true")
{
String filename = Request.QueryString["filename"];
Response.Redirect("~\\E_mail\\attached\\" + filename);
}}
沒有留言:
張貼留言