Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > File Download Dialog Box -Help

Reply
Thread Tools

File Download Dialog Box -Help

 
 
Surjit Madiwalar
Guest
Posts: n/a
 
      10-05-2004
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


 
Reply With Quote
 
 
 
 
Steven Scaife
Guest
Posts: n/a
 
      10-05-2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File download dialog box is coming while opening the document using Servlet aarthi Software 0 04-24-2007 02:20 PM
File Download dialog box shank ASP General 1 12-05-2006 03:49 AM
File download dialog box button events =?Utf-8?B?cHJhZGVlcF9UUA==?= ASP .Net 1 10-03-2006 03:42 PM
File name is displayed Garbled in "File download dialog box" =?Utf-8?B?SWJyYWhpbS4=?= ASP .Net 0 08-12-2006 06:44 AM
file download dialog box appeared twice when invoking export function. Per Padolina ASP .Net Web Services 0 08-06-2003 01:17 PM



Advertisments