日期:2014-05-18 浏览次数:20556 次
Response.Clear(); Response.Buffer = false; Response.AppendHeader("Content-Disposition", "attachment;filename=file.sql"); Response.ContentType = "text/sql"; System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); oStringWriter.Write("test"); oStringWriter.Flush(); oStringWriter.Close(); Response.Write(oStringWriter.ToString()); Response.End();