Solved

response.redirect redirecting too fast, why?

Posted on 2006-07-12
3
301 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 500 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 51
No Data for DropDown List 2 32
VS 2015 is giving [No relevant source lines] 2 38
using CK editor in iframes 5 27
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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