forcing download

G

Guest

Hello

I've a .NET HTTP Handler that retrives binary files stored on a SQL Server
database.
Passing some ID to the HTTP Handler it reads from the database and
constructs a HTTP message that
send back to the client the requested file.

To force, on client browser, the opening of the donwload window where is
asked if the user wants
to open on site or to sav the file i use a HTTP header that i found in your
pages:

Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=""" &
some_file_name & """")

In fact this does work making the client browser opens the dialog box that
asks to open or save the file.
My problemis that when i choose Open instead of save, the browser sends back
the error message of
"file not found"

How can I force the opening of that DialogBox window but maitaining the
funcionallity of open on site?!?

Can you help me here?!?!
best regards

Jorge Ribeiro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,344
Messages
2,571,432
Members
48,794
Latest member
massivestack

Latest Threads

Top