locked
Redirect after download file | Response.End() RRS feed

  • Question

  • User-906199826 posted

    Hello All, I wanna Redirect an url after downloading a file Response.End() !! Could someone Help!! Pleasee

    Thursday, January 24, 2019 2:20 PM

Answers

  • User475983607 posted

    Hello All, I wanna Redirect an url after downloading a file Response.End() !! Could someone Help!! Pleasee

    Not possible as there is one response stream.  When the response stream is ended that's it.

    Use JavaScript to download the file using an iFrame or open/close a new window then redirect using window.location = theNewUrl in JavaScript. 

    Another idea is to redirect first, then download.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 24, 2019 2:37 PM

All replies

  • User475983607 posted

    Hello All, I wanna Redirect an url after downloading a file Response.End() !! Could someone Help!! Pleasee

    Not possible as there is one response stream.  When the response stream is ended that's it.

    Use JavaScript to download the file using an iFrame or open/close a new window then redirect using window.location = theNewUrl in JavaScript. 

    Another idea is to redirect first, then download.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 24, 2019 2:37 PM
  • User-906199826 posted

    Okk! Cool

    Thursday, January 24, 2019 2:39 PM