load a word document inside window browser
- by netNewbi3
Hi,
I have a page that dynamically links to a document that opens in a new page (the document is stored in a database as binary data and I loaded using the following code:
Response.ClearContent()
Response.ContentType = myReader("MIMEType").ToString()
Response.AddHeader("Content-Disposition", "inline; filename=" & myReader("Filename"))
Response.BinaryWrite(myReader("DocBD"))
Response.End()
This works ok. However some documents have restricted access and before loading the document the user is redirected to a login page. After entering username and passowrd the document is loaded. If it is a pdf file for example, it loads in the same login page, but when it is a word or excel document it opens outside the browser window and the login page remains in the background. Is ther a way to force a word or excel document to open inside the browser window? Many thanks.