Article ID: 307603 - View products that this article applies to.
This article was previously published under Q307603
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 Basic .NET. 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.
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:
For more information, refer to the following topics in the .NET Framework Software Development Kit (SDK) documentation:
HttpResponse.WriteFile MethodFor 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:
.NET Framework SDK
.NET Framework Class Library
276488For more information, see the following books:
(http://support.microsoft.com/kb/276488/EN-US/ )How To Use the ADODB.Stream Object to Send Binary Files to the Browser through ASP
Connell, John. Coding Techniques for Microsoft Visual Basic .NETMicrosoft 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://www.microsoft.com/mspress/benelux/books/book18343.htm). Microsoft Press, 2001.
Esposito, Dino. Building Web Solutions with ASP.NET and ADO.NET
(http://www.microsoft.com/mspress/books/5727.aspx). Microsoft Press, 2001.
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.