//得到文档名
string wdm = Server.UrlDecode(Request.QueryString[ "TableName "]);
//Response.Write(wdm);
string queryString = "Select 文档名, 文档格式,文档大小,文档数据 From table Where 文档名= ' " + wdm + " ' ";
Response.Write(queryString);
string filetype = " ";
string filename = " ";
//byte[] bytes = null;
Response.Write(queryString);
OracleConnection conn = new OracleConnection( "Data Source=;Persist Security Info=True;User ID=;Password=;Unicode=True ");
OracleCommand cmd = new OracleCommand(queryString, conn);
//try
//{
conn.Open();
OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
//下载文件
if (dr.Read())
{
filename = dr.GetValue(0).ToString();
filetype = dr.GetValue(1).ToString();
Response.Clear();
Response.AddHeader( "Content-Disposition ", "attachment; filename= " + filename + ". " + filetype);
Response.ContentType = "text/ " + filetype;
Response.BinaryWrite((byte[])dr.GetValue(3));
}
dr.Close();
conn.Close();
--------------------------------------
此为一个页面,接收到参数后,从数据库下载以之相关BLOB文件。然后再把下载的内容嵌在页面里,现在出现了两个问题。
问题1:该页面放在b页面的iframe里面,在页面中打开之后该页面并没有恪守在b页面的iframe里面,而是自己完全伸展,把它的父页面“覆盖”了。怎么让这个页面继续放在b页面的iframe里面?