displaying file in browser

G

Guest

I have a button on a web page that retrieves some binary data (a word
document) from a database as a stream and writes it to a web page. This is
working ok, only problem is when someone clicks "open" on the File Download
dialog that pops up it displays the word doucument in the browser, if you
click back from there it goes to the previous page not the page where the
button to open the document was clicked. I want it to go back to the same
page, any ideas how to do this thanks. Code below.


Response.Clear();
Response.AddHeader("Content-Disposition", @"attachment;
filename=""" + cv.Name + "");
Response.ContentType = cv.MimeType;
cv.CVContent.WriteTo(Response.OutputStream);
Response.Flush();

Scott
 

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

Forum statistics

Threads
474,039
Messages
2,570,375
Members
47,020
Latest member
anuradha

Latest Threads

Top