private void btn_down3_Click(object sender, System.EventArgs e)
{
DownLoad("审查材料说明文档","CLSMLX","CLSM");
}
/// <summary>
/// 下载流文件方法
/// </summary>
/// <param name="downName">另存为名称</param>
/// <param name="downExten">后缀名</param>
/// <param name="downContent">内容</param>
void DownLoad(string downName,string downExten,string downContent)
{
OracleDataReader dr = bcy.ShowDefByid(tablena,keyword,word);
if(dr.Read())
{
Response.Clear();
Response.ContentType="application/octet-stream";
Response.AppendHeader("Connection","keep-alive");
string sbcl = System.Web.HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes(downName));
Response.AppendHeader("Content-Disposition","attachment;filename="+sbcl+dr[downExten]);
Response.BinaryWrite((byte[])dr[downContent]);
Response.End();
}
dr.Close();
}
{
DownLoad("审查材料说明文档","CLSMLX","CLSM");
}
/// <summary>
/// 下载流文件方法
/// </summary>
/// <param name="downName">另存为名称</param>
/// <param name="downExten">后缀名</param>
/// <param name="downContent">内容</param>
void DownLoad(string downName,string downExten,string downContent)
{
OracleDataReader dr = bcy.ShowDefByid(tablena,keyword,word);
if(dr.Read())
{
Response.Clear();
Response.ContentType="application/octet-stream";
Response.AppendHeader("Connection","keep-alive");
string sbcl = System.Web.HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes(downName));
Response.AppendHeader("Content-Disposition","attachment;filename="+sbcl+dr[downExten]);
Response.BinaryWrite((byte[])dr[downContent]);
Response.End();
}
dr.Close();
}