Allow operation To Complete / DoEvents (Web Based)

I have the following code and need to wait until the operation completes before forwarding. I can not use thread.sleep with out Application.DoEvents. Any suggestions? This is now an urgent matter.

 Response.ContentType = "application/msword"
        Response.AddHeader("Content-Disposition", "attachment;filename=File.doc")

(I NEED TO WAIT FOR THE ABOVE FILE TO SAVE BEFORE THE WEBSITE READS THE NEXT LINE, OR THE PAGE DOES NOT FORWARD)

        Response.Write("<script>javascript:window.location='index.aspx';</script>")
LVL 1
negenAsked:
Who is Participating?
 
negenAuthor Commented:
Problem self resolved by using a seperate form to force print the information submitted to sql server
0
 
PockyMasterCommented:
If it's in a seperate thread you might try to join the thread? (It's a guess, didn't try it in web environment)
0
 
negenAuthor Commented:
nope
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.