Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

response.redirect redirecting too fast, why?

Posted on 2006-07-12
3
Medium Priority
?
307 Views
Last Modified: 2008-02-20
Hello,

I have an ASP.NET 1.1 C# web based wizard.  Once users click the button to go from step 2 to step 3, the code behind the scenes on step3.aspx will automatically create a popup download box.  The problem, however, is that the page never refreshes for step 3.

I do this:

step2.aspx:
    Response.Redirect("step3.aspx");

step3.aspx
     Output File To Download();


but, step3.aspx is never rendered in the browser.  all that happens when you click the button on step2, is that the Output File To Download gets called and step3.aspx is never rendered.  Does anyone know how to make it so that step3.aspx will be rendered, and THEN the file is downloaded?

Thanks
0
Comment
Question by:alexthecodepoet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1500 total points
ID: 17094504
Try adding a Response.Flush() just before your file download code to flush the output buffer to the client.
0
 

Author Comment

by:alexthecodepoet
ID: 17094551
i tried putting Response.Flush(); in several different places but the same thing happens
0
 

Author Comment

by:alexthecodepoet
ID: 17102877
actually, you were almost right.  Putting Response.Flush() AFTER the line that actually makes the user download a file is what made it work.

thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question