110,539
社区成员
发帖
与我相关
我的任务
分享
protected void Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/octet-stream";
string fname = "abc.txt";
Response.AppendHeader("content-disposition", "attachment;filename=" + fname);
string str = "abcdefg";
Response.Write(str);
Response.Flush();
Response.End();
}