473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

File Download Dialog Box -Help

Hi,

I want to get dialog box(open,save,cancel) for pdf file using asp(vbscript).
Presently when i click on pdf link on the site..the pdf document opens in
the browser.

I have used the below code(download.asp?file=filename):

<%
Response.AddHeader "content-disposition", "attachment; filename=" &
request.querystring("file")
Response.ContentType = "application/octet-stream"
%>

This file resides in the same dir of pdf documents

Eg:

Downloads
|
--1.pdf
|
--2.pdf
|
download.asp

But when i request download.asp with the filename i get dialog box..but when
i open the pdf file..it gives error saying document can't be read....

Please let me know your suggestions/inputs.

Rgds,
Surjit
Jul 19 '05 #1
1 2074
I may be wrong but couldn't this be a client side browser issue. There will
probably be an option in internet explorer that makes it give you the
choice.

dont quote me on it though

"Surjit Madiwalar" <su*******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

I want to get dialog box(open,save,cancel) for pdf file using asp(vbscript). Presently when i click on pdf link on the site..the pdf document opens in
the browser.

I have used the below code(download.asp?file=filename):

<%
Response.AddHeader "content-disposition", "attachment; filename=" &
request.querystring("file")
Response.ContentType = "application/octet-stream"
%>

This file resides in the same dir of pdf documents

Eg:

Downloads
|
--1.pdf
|
--2.pdf
|
download.asp

But when i request download.asp with the filename i get dialog box..but when i open the pdf file..it gives error saying document can't be read....

Please let me know your suggestions/inputs.

Rgds,
Surjit

Jul 19 '05 #2

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

Similar topics

5
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side...
3
by: skyetech | last post by:
We're creating a file sharing area in our intranet. When a user clicks on a link they can save the file to their computer. When the file is done downloading and the 'File Download' dialog closes I...
2
by: John Spiegel | last post by:
Hi all, How does one allow a user to download a file WITH selecting where it should be downloaded to on their machine? Also, when using the WebClient.Download method, will the destination path...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
5
by: Brad | last post by:
In several aspx applications I export crytal reports to pdf, xls and doc files and then the aspx page writes the selected export file to the client browser. This all works with one small quirk: ...
4
by: Nathan Sokalski | last post by:
I want to give visitors to my site the option of downloading a generated ..txt file by clicking a button. I know how to generate text files, but how do I cause the browser to pop up one of those...
2
by: Ken Varn | last post by:
I have an ASP.NET page that incorporates the following code on a button press. private void DownloadTag_Command(object sender, CommandEventArgs e) { FileStream fs; String Filename; Filename...
5
by: Neil Rossi | last post by:
I have an issue with a particular ASP page on two web servers. Let's call these servers Dev1 and Beta1. Both Servers are running IIS 5, Windows 2000 SP4 with "almost" all of the latest patches. ...
1
by: sunita | last post by:
Hiii I open a file download dialog from a modal dialog...From the file download dialog i can either save or open the file.. Is there a way i can let the modal dialog that opens the file download...
1
by: RN1 | last post by:
In an ASP.NET app, users can upload their files to a remote server as back-up. I want to give users the provision to download files that they have uploaded to the remote server to their local...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.