Saturday, March 24, 2012

Open a document in new explore window

I have a web application which need open a word or pdf document(part of web site) after a button is clicked. I have tried response.redirect which open the file in the same window and

Response.Write("<script>window.open('~/documents/test.doc',target='new');</script>")

However, my machine (possibly my clients machine) was set to prevent pop up a new window. So is there any other way to do this?

Thanks

Maybe redirect to another page that displays the document?

0 comments:

Post a Comment