asp.net - Download file via handler without ending current response -


on page have button download document. building page steps, step 1 choosing type, step 2 downloading document , step 3 write information in textbox.

what show step 3 after button download has been pressed.

so in button_click event first put code show step 3 , need download form.

to download document use ashx handler file. works fine.

but problem when go handler, page not updated.

i used

response.redirect("givefile.ashx?file=document.doc",false) 

after reading found using response.redirect ends current response page not updated.

i thinking of creating new response , redirect 1 handler file, can't find example see how done. don't know if work.

i tried

server.transferrequest("givefile.ashx?file=document.doc",true) 

but ends current response.

who can me this?

rg, eric

google using hidden iframe download files 'in background'. check article code sample:

http://encosia.com/ajax-file-downloads-and-iframes/


Comments