Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > set header problem

Reply
Thread Tools

set header problem

 
 
prash
Guest
Posts: n/a
 
      07-02-2003
Hi All

Response.setHeader("Content-disposition", "attachment; filename="+ fileName
+ strExt);
works for IE 5.5 but not in netscape .
IE 5.5 shows the save as dialog box
NN4.79 display the contents on the browser
how can i get the save as dialog box in NN4.79



/thansk in advance

prash







 
Reply With Quote
 
 
 
 
dany
Guest
Posts: n/a
 
      07-02-2003

"prash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
>
> Response.setHeader("Content-disposition", "attachment; filename="+

fileName
> + strExt);
> works for IE 5.5 but not in netscape .
> IE 5.5 shows the save as dialog box
> NN4.79 display the contents on the browser
> how can i get the save as dialog box in NN4.79
>

I had the same problem, worked with ADODB.Stream
No I have still a few problems (look at bottom of message for script +
problems)

d.

<%
Dim Stream
Dim Contents
Dim strFileName
Dim strFilePath

strFileName = "download.pdf"

strFilePath = Server.MapPath(strFileName)

Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename=" &
strFileName

Set Stream = server.CreateObject("ADODB.Stream")
Stream.Open
Stream.LoadFromFile strFilePath
Contents = Stream.ReadText
Response.BinaryWrite Contents
Stream.Close
Set Stream = Nothing
%>

TESTED ON:
--------------
PC:
IE6+: ok
OPERA7+: ok
NS4+: ok

NS7+: gives a saveas-popup but adds ".asp" to the file "download.pdf" =>
download.pdf.asp
MOZ1.2+: same as NS7
OPERA6+: don't work, displays a lot off sh*beep*t

MAC
SAFARI: ok
IE5.2: gives popup but pdf can't be opened due to decoding-error?



 
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
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
UNIX header files to Windows header files anand.ba@gmail.com C Programming 3 05-01-2006 03:57 PM
Header files included in header files John Smith C Programming 18 07-24-2004 04:55 AM
What is better /standard for creating files. a cpp file with header or cpp and seperate file for header DrUg13 C++ 1 02-10-2004 09:20 AM
how to avoid using another header file inside a header file? Newsgroup - Ann C++ 4 11-02-2003 01:20 PM



Advertisments