Introduction
In this article, I will explain how to open a PDF file in a web browser using ASP.NET.
Use the following procedure.
Step 1
Open Visual Studio 2012 and click "File" -> "New" -> "web site...". A window is opened. In this window, click "Empty Web Site Application" under Visual C#.
![Visual Studio 2012]()
Give the name of your application as "Open_PDF" and then click "Ok".
Step 2
After this session the project has been created, A new window is opened on the right side. This window is called the Solution Explorer. Solution Explorer contains the pdf file, css file and aspx files and looks like this:
![solution explorer]()
Complete Program
CreateZip.aspx
Open.aspx.cs
Output
![open a PDF file using ASP.NET]()
Click on the button.
![open a PDF file using ASP.NET]()
For more information, download the attached sample application.