Results 1 to 2 of 2

Thread: Page Redirection Problem After performing a File Download

  1. #1
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default Page Redirection Problem After performing a File Download

    Dear Experts,

    I am developing an ASP script(s) that downloads a file whenever a user tries to download the file.

    I have a download page where i've placed some hyperlinks in the name of downloads.

    When the user clicks on those link he/she will get into another ASP page which has a license agreem, two radio buttons (I Accept and I Decline)

    The second ASP page loads itself when the user clicks the submit button after selecting the corresponding radio button

    When user click Decline radio button and press submit button it will show a dialog box with OK and Cancel button. If user press OK button he/she wants to change the radio button selection as a result he/she will remain on the page itself. If user clicks CANCEL button then he/she will be redirected to the FIRST page i mentioned earlier (Download page) .

    If the user click I Accept and Submit button then it will perform the Download of the file using ADODB.Stream object, Upto the download part it works perfectly. But I want to redirect to the 'Download' page after completing the download operation.

    I've tried Response.Redirect method after the download file code using ADODB.Stream object but it is not working.

    How could i solve this problem? Hope you'll definitley help me from this problem

    My objective is after performing a successful download operation then the user should be redirected to downloads page for more download if they wish.

    I thank all the person in Advance

    Thanks and Regards

    Code Exploiter

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You cannot modify the headers after content has been sent. You should open the download script in a new window to allow them to return.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •