Response.Clear();
Response.Buffer = true;
Response.ClearContent();
Response.ClearHeaders();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}", drAttchmentInfo["FileName"].ToString()));
Response.ContentType = "application/" + drAttchmentInfo["DocumentType"].ToString();
Response.BinaryWrite((byte[])drAttchmentInfo["Document"]);
//Response.End();
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
Response.Close();