Stuck, trying to redirect after binarywrite

Last post 03-03-2007 4:34 PM by prosenba. 2 replies.

Sort Posts:

  • Stuck, trying to redirect after binarywrite

    02-27-2007, 3:54 PM
    • Member
      276 point Member
    • prosenba
    • Member since 11-29-2002, 8:38 AM
    • Posts 185

    I thinking that once the pdf page has opened all code in the parent page stops executing until user clicks on page again. Is there some what to redirect after response.close() had done.

    Response.ContentType =

    "application/pdf";

    Response.BinaryWrite(buffer);

    Response.Flush();

    Response.Close();

    Respones.Redirect(

    "main.aspx");

     

  • Re: Stuck, trying to redirect after binarywrite

    02-27-2007, 4:27 PM
    • Star
      13,726 point Star
    • JoshStodola
    • Member since 01-16-2007, 9:17 AM
    • Heartland of America
    • Posts 3,177

    You cannot redirect after you close the response.  Remove the line of code that says Response.Close(); and your code should work fine.

    Don't forget to mark the most helpful post as Answer for the sake of future readers.  Thank you

    Josh Stodola ← Come check out my blog!
  • Re: Stuck, trying to redirect after binarywrite

    03-03-2007, 4:34 PM
    • Member
      276 point Member
    • prosenba
    • Member since 11-29-2002, 8:38 AM
    • Posts 185

    The suggestion of commiting out the Response.Close() didn't work or maybe there something else I need to do, I'm thinking maybe a timer would work here. Anybody have any other suggestions.

Page 1 of 1 (3 items)