OUTPUT FILE FROM THE BINARY STREAM WITH ASP.NET
Output File from binary stream with the asp.net
1. Output Excel File
Response.Clear();
Response.Buffer = true;
Response.AddHeader("Content-Length", outputBytes.Length.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.ContentType = "application/x-msexcel";
Response.BinaryWrite(outputBytes);
Response.End();
2. Output PDF
Response.Clear();
Response.Buffer = true;
Response.AddHeader("Content-Length", outputBytes.Length.ToString());
Response.AddHeader("Content-Disposition", "filename=" + fileName);
Response.ContentType = "application/pdf";
Response.BinaryWrite(outputBytes);
Response.End();
Thursday, June 05, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment