日期:2014-05-17 浏览次数:20409 次
#region 显示信息
/// <summary>
/// 显示信息
/// </summary>
public void showData()
{
string ID = Request.QueryString["ID"];
string sql = "select FContent,FName,FullName from Annex where id='" + ID + "'";
DataSet ds = 取得数据;
//try
{
byte[] filec = (byte[])(ds.Tables[0].Rows[0]["FContent"]);
Response.Clear();
string FileName = ds.Tables[0].Rows[0]["FName"].ToString();
string FullName = ds.Tables[0].Rows[0]["FullName"].ToString();
//string FullName = FileName;
string imageType = System.IO.Path.GetExtension(FullName).ToLower();
if (FileName.Length > 16)
{
FullName = FileName.Substring(0, 16) + "" + imageType;
}
FullName = ToHexString(FullName);
if (imageType == ".jpg")
{
ResponseEnd(filec, FullName);
}
if (imageType == ".doc")
{
ContentType = "application/msword";