Select the product you need help with
How To Write Binary Files to the Browser Using ASP.NET and Visual C# .NETArticle ID: 306654 - View products that this article applies to. This article was previously published under Q306654 On This PageSUMMARY This step-by-step article creates a sample page that
demonstrates how to retrieve binary data from a file and then how to write the
data out to the browser using ASP.NET and Visual C#. Although this
demonstration uses an Adobe Acrobat (.pdf) file (which Web application
developers commonly use), you can apply this procedure to other binary file
formats. Requirements
Create an ASP.NET Web Application Using Visual C#This section demonstrates how to create a new ASP.NET Web Application named BinaryDemo:
Add the PDF File to the ProjectTo set up your project so that you can add and run the code in the Create an ASPX Page section to follow, you must first add an Adobe Acrobat (.pdf) file to your current project. To do this in Visual Studio .NET, follow these steps:
http://www.adobe.com
(http://www.adobe.com)
Create the ASPX Page
REFERENCES For more information, refer to the following topics in the
.NET Framework Software Development Kit (SDK) documentation: HttpResponse.WriteFile Method For additional information about how to accomplish this task
using Microsoft Active Server Pages (ASP), click the article number below to
view the article in the Microsoft Knowledge Base:
(http://msdn.microsoft.com/en-us/library/system.web.httpresponse.writefile.aspx)
HttpResponse Class
(http://msdn.microsoft.com/en-us/library/system.web.httpresponse.aspx)
.NET Framework SDK
(http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en)
.NET Framework Class Library
(http://msdn.microsoft.com/en-us/library/gg145045.aspx)
276488 Microsoft provides third-party contact information to help you find
technical support. This contact information may change without notice.
Microsoft does not guarantee the accuracy of this third-party contact
information.
(http://support.microsoft.com/kb/276488/EN-US/
)
How To Use the ADODB.Stream Object to Send Binary Files to the Browser through ASP
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products. Properties | Article Translations
|


Back to the top








