我用的如下代码
protected void Linkbtn_Click(object senter, EventArgs e)
{
int jID = Convert.ToInt32(((LinkButton)senter).CommandArgument);
string loginName = Session["TacherName"].ToString();
string TrueName = bll_tem.GetTeachersDatabaseById(jID).JTrueName;
string path = "~/UsersFolder/Teacher/" + loginName + "/" + TrueName;
Response.ContentType = "application/x-zip-compressed";
Response.AddHeader("Content-Disposition", "attachment;filename="+TrueName);
string file = Server.MapPath(path);
Response.TransmitFile(file);
}
但是点击下载文件后,如果关联到迅雷,下载下来的就是aspx文件,直接用IE下可以,请问如何解决?
aspx页面返回的是整个页面; 内容下载一般是放在一般处理程序中
用迅雷下载的?