473,796 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PDF files launch in notepade???

Can someone please tell me why when ever I view a PDF file through my web
application the file opens in notepad...

I have checked my file association and the client machine is set to launch
PDF's in Acrobat Reader 7 so that isn't the problem...

Here is the part of the code for my view.aspx file... which works fine with
word an excel documents but for some reason won't open PDF's...

Thanks
...CODE..
While myReader.Read
Response.Binary Write(myReader. Item("Data")) 'Writing the
File retrieved from the database
Response.Conten tType = myReader.Item(" fileType") 'Setting
the file type of the retrieved file
End While
Nov 19 '05 #1
1 1374
G'day Tim.

I would check what that Response.Conten tType is getting set to. Should
probably be "applicatio n/octet-stream"

Also are you doing:

response.AddHea der("Content-Disposition", "attachment ; filename=" + fileName);

or something similar?

Hth,

Cheers,

Paul

"Tim::.." wrote:
Can someone please tell me why when ever I view a PDF file through my web
application the file opens in notepad...

I have checked my file association and the client machine is set to launch
PDF's in Acrobat Reader 7 so that isn't the problem...

Here is the part of the code for my view.aspx file... which works fine with
word an excel documents but for some reason won't open PDF's...

Thanks
..CODE..
While myReader.Read
Response.Binary Write(myReader. Item("Data")) 'Writing the
File retrieved from the database
Response.Conten tType = myReader.Item(" fileType") 'Setting
the file type of the retrieved file
End While

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
7719
by: Keith Brown | last post by:
I have an application that allows embedded storage of ANY chosen file in an OLE field. The file could have been dragged-and-dropped into the field or it might have been selected and imported programmatically using the common file dialog. Regardless, I need to determine the filetype/extension of each of these files already stored in my OLE fields and display it for the user. Double-clicking the raw OLE field or using the .Verb =...
7
1693
by: Chuck Bowling | last post by:
I'm doing something wrong... not quite sure what... I got a basic web forms page built and running inside the IDE per ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbwlkWalkthroughCr eatingBasicWebFormsPage.htm The project works exactly as it should inside VS.NET however, if i try to click on the WebForm1.aspx file in \\localhost\WebApplication1 it launches the .aspx file in the IDE but won't launch a separate browser...
2
3485
by: Cy Huckaba | last post by:
I am writing a program that will search xml files for some of our dev team here and list the files in a list box. I would like to be able to double-click on the file name and have the file open with the users preferred editor. The problem is that some of our teams uses different editors and I want the action to launch the file with the edit verb so that the users editor will launch, regardless of what that program is. Is there a way to...
5
20081
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process or call external program as of different user. The problem of that design is that the mother application is still running as current user. I know that less privilege is more secure.
1
5854
by: Kesavan | last post by:
I install apache2 in /usr/local/apache2 and install php5 by ./configure --with-apxs2=/usr/local/apache2/bin/ apxs PHP is successfully installed in my system. But now my .php files inside /usr/local/apache2/htdocs doesn't get phrased. When I run suse-10-2:/home/kesavan # php info.php
6
11633
by: henryrhenryr | last post by:
I have tried posting in PHP forum but no reply. I think it's not a problem with PHP anyway so perhaps someone in this forum can help. When I use the code below to try and launch notepad.exe from within a PHP script using the exec() function, I can see the process has been added to the process list (from task manager) but notepad hasn't started! The process cannot be forced to quit either. The exec() function seems to work but I want the...
8
9025
by: =?Utf-8?B?Umlja0Q=?= | last post by:
Suddenly I find myself unable to open Winforms files in designer mode. I get the message quoted below. I can open other types of vb files like modules, classes and code behind files, but simply creating a new project and double clicking on Form1.vb gets me this message: <<< There is no editor available for 'C:\....\Form1.vb'. Make sure the application for the file type (.vb) is installed.
4
4216
by: Karl | last post by:
Hi all, I want to write an application that is launched from the context menu in Windows Explorer/Computer. That is to say, when I am browsing around my hard drive and get to any location I choose, I want to be able to select several files, right click my mouse and launch an application which will act on the selected files. However, I don't even know where to start and have a number of questions!
4
2455
by: Stef Mientki | last post by:
Hello, I've 2 questions about python help files: 1. how can I launch the windows help file (CHM), from python with a keyword as argument ? 2. now when my program should also run under Linux/Mac, how should I call the help file under Linux/Mac.
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10012
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5442
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.