0

I have a handler that I call when a link gets clicked. This handler gets the file contents from the DB and writes the contents to context.Response. I'd like to open this file as well along with it getting downloaded. Is this possible?

neuDev33
  • 1,573
  • 7
  • 41
  • 54

2 Answers2

1

no. it is not.

if its a bitmap file - then maybe becuase it doesnt have to be fully downloaded...

but forget about it. it is not the right way.

you cant open a file while it is being downloaded - its a filesystem - restriction

Royi Namir
  • 144,742
  • 138
  • 468
  • 792
1

You have no control over browser's behavior. It will either open in browser OR display open/save dialog.

You may try to render custom page with HTML view of the file and automatically trigger second download from that HTML page to force open/save dialog.

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179