How can I view a pdf file in the browser using asp.net

 How can I view a pdf file in the browser using asp.net...

 In my project i have a link and its a pdf. I would like that when i click the link it will view the pdf file in another window.

 

Thanks
 

0
aldebaran
11/16/2007 7:25:17 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

11 Replies
564 Views

Similar Articles

[PageSpeed] 50

<a href="somepdf.pdf" target="_blank">Click here</a>

 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
11/16/2007 7:30:35 AM

 Thanks it works what if, if the browser has no adobe reader? what should be dislplay?

Thanks 

0
aldebaran
11/16/2007 8:08:55 AM

If there is no PDF viewer on the client machine, the default behaviour of the browser is to produce a Download dialogue box.  As a web developer, you have no control over that.

 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
11/16/2007 8:30:22 AM

 

so I dont need to add controls for the client to download the acrobat reader?... OK thanks
0
aldebaran
11/16/2007 12:28:52 PM

 

so I dont need to add controls for the client to download the acrobat reader?... OK thanks
0
aldebaran
11/16/2007 12:32:29 PM

aldebaran:

so I dont need to add controls for the client to download the acrobat reader?... OK thanks

 

Nope.  But you might want to provide users with a link to Adobe Reader if you like.   It's up to them whether they follow the link and install the reader.

 

 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
11/16/2007 12:35:40 PM

 

is there a way how to know if the browser have a acrobat reader plug in when the page loads?
0
aldebaran
11/16/2007 1:29:22 PM

You can use javascript.  I found this: http://www.builtfromsource.com/category/firefox/ 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
11/16/2007 1:58:42 PM

 One last question, where would I put that javascript codes?

Thanks.... 

0
aldebaran
11/16/2007 4:53:05 PM

In the <head> section of your page.

 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
11/16/2007 7:31:24 PM

 Thnks...

1
aldebaran
11/17/2007 10:17:05 AM
Reply:

Similar Artilces:

how can i Get OCX File in .net IDE vb.net/C3
hi all,      How can I generate OCX file in VB.net/c# 2005 that will interact in web pages...?Thanks & Regards,Murthy. Hi murthysrn, As far as I know, VB 2005 and C# 2005 cannot create the project for ocx file. However, I hope the following link will be helpful to you. Creating an ActiveX Control in Visual Studio 2005http://msmvps.com/blogs/pauldomag/archive/2006/08/16/107758.aspxSincerely,Benson YuMicrosoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other co...

How can I edit a pdf file using C#.net
 How can I edit a pdf file using C#.netRegards Anu Palavila I think you need to look for a good API.I found this one. I don't know if there is an opensource API. Try Googling Edit PDF .NET APIJef Claes~~~~~~~~~~Visit my blog  Hi,U may use itextsharphttp://sourceforge.net/projects/itextsharp/http://csharpdotnetfreak.blogspot.com/2008/12/export-gridview-to-pdf-using-itextsharp.htmlHope It helpsThanksAvinash TiwariRemember to click “Mark as Answer” on the post, if it helps you.  Hi anupalavila,You can use pdftotext to convert pdf to plain text file and iTextSharp  ...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

How to convert .tiff image file to .pdf file without using any 3rd party tool using C#.net
HI allI have a urgent requirement i want to convert .tiff image to .pdf file Thanks in advance Regards RaviPlease click "mark as answer" if this post helped you. I dont think its possible without doing a lot of code or using third party tools, but if you  are looking for a free tool you can try a combination of http://blog.codebeach.com/2008/02/convert-multipage-tiff-to-pdf-in-net.htmland  http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx Thanks and RegardsS.K.Vignesh----------------------Do remember to "Mark as answer" for this pos...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

Keep getting..."Unable to get project file from server",when using vs.net
When trying to open any existing asp.net project in Visual Studio it keeps giving me the message above. It is also throwing an error when I create the project in the first place, it happens when a dos window is opened, the text in the dos window is running "Common Language Runtime Minidump Utility version 1.0.3705.0" and then VS craps out says there was an error and shuts down. I've re-installed the .net components and framework with no avail, and FrontPage extensions etc.. are all installed. I'm running XP professional and have installed IIS 5.1. This is driving me fec...

Create PDF file using .NET
Hello List, Can someone tell me how can I create PDF file using .NET? Thanks in advance, Peter, Hi, Tale a look @ ABCpd HTH K B ShajudeenAreYaar.comDubai, United Arab Emirates. Also, Siberix PDF Library for .NET is available as a trial download. I had the trial up and running in minutes. Couldn't have been easier ...Alister Below post has some related info http://asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=380008Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

How benificial is it to use VS.NET? Can I do just as well with VB.NET?
How benificial is it to use VS.NET? Can I do just as well with VB.NET? I'm probably going to be moving from handcoding with HomeSite and ASP Classic to ASP.NET. From all I read VS.NET seems the tool of choice but expensive. Will VB.NET do just as well if all I plan to write is VB code? Any other good choices? Thanks As far as i know there is no Product" entitled vb.net. Visual Studio.Net 2002/2003 differs from it's non .net predesser (mental block, cant spell - sorry) in that all technologies (ie. VB, c# C++, J#) are developed from within the one application(IDE). There...

How to Run my .exe file or Application in the Background using .NET Application like explorer.exe file is Running always in the Background...(you can see in task Manager..)
Hi , This is Sundar , i want to develope one small Application in windows or web ,that should send the mail continiously according to at what time scheduled in the application and that should Running in the Background always like windows service,SQL server ........ so , please help me ......................  what;s the problem if you develop an windows service and install it in your system.  http://www.15seconds.com/issue/021007.htmGive a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.  see, i have created the Windows services and wh...

Read a PDF file using C#.Net
 Hi,    Is there any way to read a PDF file using C#.net?I have already used third party tools like itextsharp and its dlls. But it is not worthy.Is there any alternative third party dlls?If any body tell means it would be a great help.Thanks in advance!    Have a look at the following - they are C# projects that include a read of PDF's Parsing PDF files in .NET using PDFBox and IKVM.NET (managed code). http://www.codeproject.com/KB/string/pdf2text.aspxA Windows Service that indexes DOC, PDF, XLS, PPT, RTF, HTML, TXT, XML, and other file formats http:...

Generating a PDF file using c#.net
Hello,  I' m having to create  a pdf file at the click of a button. I' m new to this can you please suggest a procedure I could follow or a tutorial I could read. thanks Mythili You would be best advised to use a component to help you with this. It's going to be very hard to do by hand. Google should be able to find you alternatives fairly easily.  check this 3rd party control  HTML to PDF converter. The conversion can be done with only a few lines of code.  and also check this linkMy Blog"Don't be afraid to be wrong; otherwise you'l...

can not add a record to a db table using the vb.net and ado.net
Hi   I am trying to insert record to Pups Database using ado.net and vb.net in a windows application. This form will collect data from user to insert it into stores table at Pubs database (storeID, name, address etc..). I am not able to get the new inserted record into the stores table here is my coude behind for the formImports System.Data.SqlClient  Public Class ParametersExample Inherits System.Windows.Forms.FormDim con As SqlConnection  Private Sub addBttn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles addBttn.Click Dim cmd As SqlCommand = ...

How can I use Net::SSH2 or Net::SSH::Perl in krb5 authen env?
--f46d0442837002432804c89039d6 Content-Type: text/plain; charset=ISO-8859-1 Hello all: I usually like to use Net::SSH2 or Net::SSH::Perl module to send commands to the cluster. But now, these servers change to be authenticated by kerberos5.When I kinit and try my old scripts, it failed! $ssh2->auth_list return "gssapi-keyex" and "gssapi-micpasswd", but nothing related in PODs of Net::SSH2/Net::SSH::Perl. Thanks for help~~ --f46d0442837002432804c89039d6-- ...

used a c#.net to vb.net converter and am now getting a syntax error.
ok I used a cool utility at http://www.kamalpatel.net/ConvertCSharp2VB.aspx to convert some c#.net to vb.net and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Web resources about - How can I view a pdf file in the browser using asp.net - asp.net.getting-started

Blind Browser
Nifty idea from Charlie Deets: a browser for web designers working on retina displays, to test how sites look on non-retina displays.

Chromium (web browser) - Wikipedia, the free encyclopedia
... of the major aims of the project is for Chrome to be a tabbed window manager, or shell for the web, as opposed to it being a traditional browser ...

Star Wars: The Force Awakens: Browser extensions help avoid online spoilers
There are at least two extensions for Google's Chrome browser that will help you stay away from spoilers for the new film.

Obscura Camera 2.0 introduces Photos edit extension and improved photo browser
... edit extension lets you apply Obscuras wonderful filters on photos you may have taken with other, lesser camera apps. Improved photo browser ...

Price Drop: Life Web Browser
Life Web Browser 1.5 Device: iOS Universal Category: Productivity Price: Free, Version: 1.5 ( iTunes ) Description: Life Web Browser is Universal! ...

PSA: Latest Humble Bundle lets you play 19 Neo-Geo games in your browser
Art of Fighting 2 —and 18 other SNK Neo-Geo classics—can now be played legally and easily in a Chrome or Firefox web browser thanks to this week's ...

Microsoft settles shareholders' lawsuit over browser blunder
Microsoft (Nasdaq: MSFT) executives settled a lawsuit with shareholders after a "technical error" cost the company a $732 million fine from European ...

One of Google Chrome's best features is coming to Microsoft's new web browser
Microsoft Edge, the replacement for Internet Explorer, could be about to get browser extensions after launching without them, according to a ...

Google hopes Go will give a browser boost
The Net giant is working to integrate its new Go programming language with its Chrome browser and Native Client technology to speed Web-based ...

Microsoft's Edge keeps shedding share as users pick other browsers on Windows 10
Microsofts Edge browser, the replacement for Internet Explorer on Windows 10, continues to struggle to retain users, according to multiple metrics ...

Resources last updated: 12/25/2015 12:13:45 AM