<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx</link><description>In this pick, I am sharing a project using which you can send PDF files to the IE Client in four different ways. You may download the project by clicking here . Create a new C# Website. While creating the following pages ensure that you DON'T have "Place</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>4 ways to send a PDF file to the IE Client in ASP.NET</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#559991</link><pubDate>Fri, 24 Mar 2006 18:28:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:559991</guid><dc:creator>dotnetkicks.com</dc:creator><description>Trackback from dotnetkicks.com</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#566484</link><pubDate>Sat, 01 Apr 2006 13:45:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:566484</guid><dc:creator>sss</dc:creator><description>good</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#570715</link><pubDate>Fri, 07 Apr 2006 14:11:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:570715</guid><dc:creator>Bhaskar Tripathi</dc:creator><description>Is there any way to write a pdf from an HTML string rendered in the code behind without using a third component like ITextsharp??&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards&lt;br&gt;Bhaskar</description></item><item><title>I want to show a pdf in a web browser</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#576329</link><pubDate>Fri, 14 Apr 2006 13:16:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:576329</guid><dc:creator>Lica Aurelian George</dc:creator><description>Hy.I am using VB.NET.I have a little problem.I want to show a pdf on a new page, using JavaScript (Window.Open(url...)).In my page i write in codebehind: &lt;br&gt; With Response&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.ClearContent()&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.ClearHeaders()&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.ContentType= &amp;quot;application/pdf&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Buffer = True&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.BinaryWrite(myStream)&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.End()&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End With&lt;br&gt;&lt;br&gt;where myStream is a stream of bytes (array of byte) I am sure that my stream is ok... but i don't see anything unless I use other types of files (jpeg for example).But with pdf is not working</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#584063</link><pubDate>Wed, 26 Apr 2006 15:28:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:584063</guid><dc:creator>shalini</dc:creator><description>HI&lt;br&gt;i want the same application to do in vb.net but in windows application.&lt;br&gt;can u plz help me how to do that&lt;br&gt;&lt;br&gt;Regards&lt;br&gt;shalini</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#584071</link><pubDate>Wed, 26 Apr 2006 15:37:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:584071</guid><dc:creator>asasas</dc:creator><description>good</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#586025</link><pubDate>Fri, 28 Apr 2006 17:46:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:586025</guid><dc:creator>Paul Marangoni</dc:creator><description>I am getting an error after downloading a pdf file using this method (with transmitfile).&lt;br&gt;&lt;br&gt;&amp;quot;There was an error opening this document. The file is damaged and could not be repaired&amp;quot;&lt;br&gt;&lt;br&gt;When I view the file in notepad, I see that there is a bunch of HTML from the web page appeneded. Shouldn't Response.End() prevent this?</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#587636</link><pubDate>Mon, 01 May 2006 19:43:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:587636</guid><dc:creator>rahulso</dc:creator><description>Yes Paul, Response.End should take care of this. Can you tell me which way among the 4 you used and what version of Adobe Reader and Operating System you are using? &lt;br&gt;&lt;br&gt;Does it happen with all the PDF files, or the ones which are greater than specific size?</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#594464</link><pubDate>Wed, 10 May 2006 15:04:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:594464</guid><dc:creator>Krshna</dc:creator><description> I am trying to transmit a zip file using the Response.Transmitfile method. Its sending the file and also appending the aspx page's html to it. Am I missing anything here? Below is the code I am using &lt;br&gt;&lt;br&gt;Response.ContentType = &amp;quot;application/x-zip-compressed&amp;quot; &lt;br&gt;Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment;filename=&amp;quot; + sFileName) &lt;br&gt;Response.TransmitFile(&amp;quot;C:\test.zip&amp;quot;) &lt;br&gt;&lt;br&gt;I even tried using octet-stream instead of x-zip-compressed. I checked the IIS Server's mime-type and x-zip-compressed has been mapped to .zip file. &lt;br&gt;&lt;br&gt;If I use Response.End then I don't get Open/Save dialog window. Technique used to display is&lt;br&gt;&lt;br&gt;Search.aspx - To search files to be downloaded&lt;br&gt;Results.aspx - displays matched files with a check box against each of them. At the bottom of the page I have a button &amp;quot;Download checked File&amp;quot;. On clicking this button, the button click event triggers the download code&lt;br&gt;&lt;br&gt;Regards &lt;br&gt;Krish </description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#601263</link><pubDate>Thu, 18 May 2006 23:57:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:601263</guid><dc:creator>Mark Burns</dc:creator><description>I am getting the error &amp;quot;Not a valid Virtual Path&amp;quot;. My path is &amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.mysite.com/pdfs/12345ab.pdf&amp;quot;"&gt;http://www.mysite.com/pdfs/12345ab.pdf&amp;quot;&lt;/a&gt;. &lt;br&gt;I had been trying to stream the file in ASP.net 2.0 which does not work in IE (&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305153"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305153&lt;/a&gt;).</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#608032</link><pubDate>Fri, 26 May 2006 17:29:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:608032</guid><dc:creator>Bhaskar Tripathi</dc:creator><description>I have found a solution for all the above queries... &lt;BR&gt;please google for "Itextsharp". You will find a gr8 API provided by them to CONVERT HTML-2-PDF,ASPX-2-PDF,XLS-2-2PDF. &lt;BR&gt;&lt;BR&gt;Regards &lt;BR&gt;Bhaskar Tripathi </description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#648730</link><pubDate>Tue, 27 Jun 2006 21:09:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:648730</guid><dc:creator>Steve</dc:creator><description>How come the Page Load event code for PDFContainer.aspx it works, but does not work when I put in the same code in the code behind file PDFContainer.aspx.cs?&lt;br&gt;&lt;br&gt;It works as it is in this demonstration but when I cut that Page Load code and put it in the code behind file I get a blank page.</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#756190</link><pubDate>Fri, 15 Sep 2006 19:51:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:756190</guid><dc:creator>Sachin</dc:creator><description>Great post. Needed to save an xls file to the client computer and this post helped me do it in no time.&lt;br&gt;&lt;br&gt;Great work!</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#761501</link><pubDate>Tue, 19 Sep 2006 06:32:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:761501</guid><dc:creator>Neil Gorin</dc:creator><description>Hi Rahul,&lt;br&gt;&lt;br&gt;It is so nice to see your beautiful Anika growing and developing well. &amp;nbsp;&lt;br&gt;I wonder if you think this concept can be extended to downloading images to an image control. &amp;nbsp;I have several thumbnail images that are not contained in the web root or a subfolder of the web root. &amp;nbsp;I do not want my users knowledge of the physical path of my images. &amp;nbsp;&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Neil Gorin</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#761891</link><pubDate>Tue, 19 Sep 2006 14:42:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:761891</guid><dc:creator>rahulso</dc:creator><description>Hi Dr. Neil,&lt;br&gt;&lt;br&gt;Nice to see your entry here! :o)&lt;br&gt;&lt;br&gt;Regarding the same concept being extended for the image control, I would say, it is possible to ensure that &amp;quot;I do not want my users knowledge of the physical path of my images&amp;quot;. But if you follow the above methods, u will not be able to get the desired affect.&lt;br&gt;&lt;br&gt;I would rather suggest streaming down the image files from the database using response.binarywrite. Although, personally I would rather refrain myself from doing it because of the performance hit.&lt;br&gt;&lt;br&gt;If the main task is to ensure that no-one is able to go the folder where you have kept all your graphics, creating a web.config and denying access in some way might be a better solution!! &lt;br&gt;&lt;br&gt;You can also probably opt for URL Rewriting. Involves a little bit of coding, but probably the best!&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Rahul</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#940237</link><pubDate>Fri, 03 Nov 2006 10:59:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:940237</guid><dc:creator>Mahesh</dc:creator><description>&lt;p&gt;I need to count the total number of pages in a pDF document using VB.NET. &amp;nbsp;Is it possible&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1327609</link><pubDate>Wed, 20 Dec 2006 03:11:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1327609</guid><dc:creator>steve</dc:creator><description>&lt;p&gt;Hi, could you point out how to use adobe open parameters? trips when using something like: Response.TransmitFile(....SYS.PDF#page=71)&lt;/p&gt;
&lt;p&gt;SYSA.PDF#page=71' is not a valid virtual path.&lt;/p&gt;
&lt;p&gt;Response.Redirect is working for me either. &lt;/p&gt;
&lt;p&gt;Like to display different page numbers directly from code. Using acrobat 8&lt;/p&gt;
&lt;p&gt;Thanks -Steve&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1332107</link><pubDate>Wed, 20 Dec 2006 18:26:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1332107</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;Honestly speaking, I don't have the answer. I am not aware of the PDF DOM.&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1602389</link><pubDate>Mon, 05 Feb 2007 10:22:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1602389</guid><dc:creator>ritu</dc:creator><description>&lt;p&gt;u hav given all the 4 ways for opening pdf file at button click.how could i do it at page load event.when i hav tried to do dats nothing appears on screen whereas at button click every thing goes right&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1673724</link><pubDate>Wed, 14 Feb 2007 08:05:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1673724</guid><dc:creator>Amit</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Great help! :)&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1673905</link><pubDate>Wed, 14 Feb 2007 08:52:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1673905</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hi Ritu,&lt;/p&gt;
&lt;p&gt;If you notice, to make everything happen as we expect we work with headers.&lt;/p&gt;
&lt;p&gt;The problem with Page Load event is that if you have reached till Page_Load, your headers etc are already sent and you will not get the desirable effect.&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#1925213</link><pubDate>Wed, 21 Mar 2007 15:12:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1925213</guid><dc:creator>nitin</dc:creator><description>&lt;p&gt;hi, &lt;/p&gt;
&lt;p&gt;how can i convert a .aspx file to pdf file on click of a button and save it to disk.&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#2067682</link><pubDate>Tue, 10 Apr 2007 07:20:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2067682</guid><dc:creator>Saurabh</dc:creator><description>&lt;p&gt;Good job!&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#2377327</link><pubDate>Wed, 02 May 2007 20:37:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2377327</guid><dc:creator>Jim H</dc:creator><description>&lt;p&gt;I used method 2 but the pop-up blocker(s)&lt;/p&gt;
&lt;p&gt;intercept. In IE, if the user clicks 'Download'&lt;/p&gt;
&lt;p&gt;the dialog box nerver appears and they have no idea where or if te file was saved.&lt;/p&gt;
&lt;p&gt;How do you get around pop-up blockers and let the user decide whether ot not to download.&lt;/p&gt;
&lt;p&gt;JH&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#2377737</link><pubDate>Wed, 02 May 2007 20:56:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2377737</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;AFAIK, The pop-up blocker is a client side setting and the server will unfortunately have no clue if the client is disabling that download.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#3012736</link><pubDate>Thu, 31 May 2007 23:37:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3012736</guid><dc:creator>hyma</dc:creator><description>&lt;p&gt;I have a .aspx page and in that page's code behind, i will get data from database and write client script that would create basic HTML content based on the data from the database. &amp;nbsp;Now I want this page to be displayed in pdf. &amp;nbsp;Could you please help, Rahul.&lt;/p&gt;
&lt;p&gt;THe thing with your &amp;quot;four ways to send a pdf file is&amp;quot;, you have to have pre-sepecified .pdf file. &amp;nbsp;Mine is not like that. &amp;nbsp;It has to create the pdf file on the fly. &amp;nbsp;Could you please help.&lt;/p&gt;
&lt;p&gt;Thanks in Advance&lt;/p&gt;
&lt;p&gt;Hyma &lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#3782673</link><pubDate>Mon, 09 Jul 2007 18:27:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3782673</guid><dc:creator>Henry</dc:creator><description>&lt;p&gt;TO MAKE IT WORK IN THE PAGE_LOAD IN THE CODE BEHIND !!!&lt;/p&gt;
&lt;p&gt;I had an issue where I couldn't load the PDF in the page load. &amp;nbsp;I created the PDF in a memory stream and found that I had to add this to my code -&lt;/p&gt;
&lt;p&gt;Response.ClearHeaders(); &lt;/p&gt;
&lt;p&gt;After adding that, the page loads with the PDF.&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#4322373</link><pubDate>Fri, 10 Aug 2007 17:42:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4322373</guid><dc:creator>Gopi</dc:creator><description>&lt;p&gt;I want to show the PDF file in part of the IE window (like top half of the window) and show other information in the remaining part. How do we do this? Thanks.&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#6970261</link><pubDate>Thu, 03 Jan 2008 21:00:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6970261</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;Henry,&lt;/p&gt;
&lt;p&gt;THANK YOU! I was having the same problem, and your solution worked!&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7208301</link><pubDate>Wed, 23 Jan 2008 16:05:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7208301</guid><dc:creator>Haritha</dc:creator><description>&lt;p&gt;Hi.. I am having problem with Adobe version 6. The pdf file is not opening with Adobe 6 but the same code is working fine for Adobe 5. &lt;/p&gt;
&lt;p&gt;I am using the below code:&lt;/p&gt;
&lt;p&gt;Response.Clear()&lt;/p&gt;
&lt;p&gt;Response.ClearContent()&lt;/p&gt;
&lt;p&gt;Response.ClearHeaders()&lt;/p&gt;
&lt;p&gt;Response.Buffer=true&lt;/p&gt;
&lt;p&gt;Response.ContentType = &amp;quot;application/pdf&amp;quot;							Response.BinaryWrite(Node.nodeTypedValue)				&lt;/p&gt;
&lt;p&gt;Response.Flush()&lt;/p&gt;
&lt;p&gt;Response.Close()&lt;/p&gt;
&lt;p&gt;Response.End()	&lt;/p&gt;
&lt;p&gt;Any help??&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7209689</link><pubDate>Wed, 23 Jan 2008 18:41:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7209689</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hi Haritha,&lt;/p&gt;
&lt;p&gt;The sample here were tested against Adobe 7.0+. Unfortunately, I don't even have the Adobe reader 5.0/6.0.&lt;/p&gt;
&lt;p&gt;Anyways, you may try playing around with commenting out some statements and check if that makes a difference.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7221307</link><pubDate>Thu, 24 Jan 2008 15:41:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7221307</guid><dc:creator>Haritha</dc:creator><description>&lt;p&gt;Hi Rahul,&lt;/p&gt;
&lt;p&gt;Thank you very much for your response.&lt;/p&gt;
&lt;p&gt;I have been trying to fix this. But unfortunately my code is in ASP and couldn't find any solution as of now.&lt;/p&gt;
&lt;p&gt;Seems like there is some problem with IE and Adobe Reader 6.0 versions as I am able to open the pdf file with the same code using FireFox and Adobe Reader 6.0&lt;/p&gt;
&lt;p&gt;Will post here if I find any solution.&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7223042</link><pubDate>Thu, 24 Jan 2008 18:16:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7223042</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hello Haritha,&lt;/p&gt;
&lt;p&gt;You may try Fiddler Tool to analyze what's different. &lt;/p&gt;
&lt;p&gt;Although, even my gut feeling is saying that it is more likely an issue with IE+Adobe 6.0 combo which is causing it.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7242985</link><pubDate>Fri, 25 Jan 2008 20:23:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7242985</guid><dc:creator>Haritha</dc:creator><description>&lt;p&gt;Hello Rahul,&lt;/p&gt;
&lt;p&gt;I am facing a new problem now. With the code provided everything is working fine for the first time but later when I am trying to create the pdf by submitting the form several times, I am getting error &amp;quot;There was an error opening this document. The file cannot be found&amp;quot;.&lt;/p&gt;
&lt;p&gt;I am using Adobe version 7.0 and IE 6.0&lt;/p&gt;
&lt;p&gt;Please let me know your thoughts.&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#7243045</link><pubDate>Fri, 25 Jan 2008 20:30:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7243045</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hello Haritha,&lt;/p&gt;
&lt;p&gt;I am not sure why this would be caused because I have tested all these snippets on my box. &lt;/p&gt;
&lt;p&gt;But, a Filemon trace could give you an idea of what's happening. Run it while there are issues happening on your server and see if you are able to analyze the data to fix the issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#8856954</link><pubDate>Wed, 13 Aug 2008 11:45:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8856954</guid><dc:creator>europhile</dc:creator><description>&lt;p&gt;Great thread for important issue Rahul.&lt;/p&gt;
&lt;p&gt;Am having problems with opening downloaded Word doc in same window, it works fine for PDFs, JPGs etc but not Word/Excel (2008).&lt;/p&gt;
&lt;p&gt;Have stripped VB code down to your Way1.aspx and also tried the inline:&lt;/p&gt;
&lt;p&gt;Response.AppendHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;inline;Filename=file.doc/xls&amp;quot;)&lt;/p&gt;
&lt;p&gt;However, Word/Excel seems to ignore it and gives the Open/Save dialogue so that Open will do so in a new application, not within the browser. There's no special overriding MIME mappings on the site itself and nothing specifically set up within IE7 - same thing happens with FireFox anyway, so it seems as though Office has highjacked the ownership and opening of its documents, even though it's specified explicitly inline within the TransmitFile.&lt;/p&gt;
&lt;p&gt;Has anyone else had this problem? Might be missing something obvious, but this appears to be a major flaw with Office!&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#8857664</link><pubDate>Wed, 13 Aug 2008 14:24:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8857664</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hello Europhile,&lt;/p&gt;
&lt;p&gt;You need to change the ContentType to &amp;quot;application/vnd.ms-excel&amp;quot;...&lt;/p&gt;
&lt;p&gt;Try way2.aspx and modify the Button1_click event.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;protected void Button1_Click(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ClearHeaders();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ContentType = &amp;quot;application/vnd.ms-excel&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.Clear();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.AppendHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment;Filename=UML.xlsx&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.TransmitFile(&amp;quot;UML.xlsx&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.End();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#8869015</link><pubDate>Fri, 15 Aug 2008 10:41:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8869015</guid><dc:creator>Europhile</dc:creator><description>&lt;p&gt;Many thanks Rahul, handy new mime type!&lt;/p&gt;
&lt;p&gt;Unfortunately, this still opens in a new app window after the Open or Save dialogue. Have you tried it with an office doc? &lt;/p&gt;
&lt;p&gt;I changed your AppendHeader from attachment to inline but both do the same thing! Maybe this is where the bug is, it should be fairly generic code but office ignores the inline?&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#8869314</link><pubDate>Fri, 15 Aug 2008 13:24:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8869314</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Hello Europhile,&lt;/p&gt;
&lt;p&gt;I guess you are right. I tried the following code and got a security prompt. &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;protected void Button1_Click(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ClearHeaders();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ContentType = &amp;quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.Clear();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.AppendHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;inline;Filename=UML.xlsx&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.TransmitFile(&amp;quot;UML.xlsx&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.End();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;The following link explains this...&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/vsofficedeveloper/pages/Excel-2007-Extension-Warning.aspx"&gt;http://blogs.msdn.com/vsofficedeveloper/pages/Excel-2007-Extension-Warning.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#8869316</link><pubDate>Fri, 15 Aug 2008 13:25:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8869316</guid><dc:creator>rahulso</dc:creator><description>&lt;p&gt;Also, you may refer to this page for a lot of other MIME types...&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/vsofficedeveloper/pages/Office-2007-Open-XML-MIME-Types.aspx"&gt;http://blogs.msdn.com/vsofficedeveloper/pages/Office-2007-Open-XML-MIME-Types.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Downloading a Html file</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#9028061</link><pubDate>Sat, 01 Nov 2008 14:59:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9028061</guid><dc:creator>Raja sekhar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I'm trying to download html page with TransmitFile. It is opening in same browser. But I want open in new window. Can you help me on this....&lt;/p&gt;
&lt;p&gt;Rajasekhar&lt;/p&gt;</description></item><item><title>re: 4 ways to send a PDF file to the IE Client in ASP.NET 2.0</title><link>http://blogs.msdn.com/rahulso/archive/2006/03/24/4-ways-to-send-a-pdf-file-to-the-ie-client-in-asp-net-2-0.aspx#9242707</link><pubDate>Fri, 19 Dec 2008 22:33:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9242707</guid><dc:creator>Mohammad Azam</dc:creator><description>&lt;p&gt;Does not work?? Always giving that the file is damaged or corrupted! &lt;/p&gt;
&lt;p&gt; Response.ClearHeaders();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ContentType = &amp;quot;application/zip&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.Clear();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.AppendHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment;Filename=UML.zip&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.TransmitFile(&amp;quot;~/Files/&amp;quot;+&amp;quot;MyZipFolder.zip&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.End();&lt;/p&gt;</description></item></channel></rss>