Waiting for code to finish

I need a way to wait for the current code i have pending in my aspx page to finish before redirecting to my success url. Basically I have a submit button that processes all the info and loads it into sql. After this i have a java call to print the form and then a redirect call to send the user to the success page. I have tried threading.sleep with out resolve.
LVL 1
negenAsked:
Who is Participating?
 
negenAuthor Commented:
Problem self resolved by using javascript:settimeout function, please close
0
 
Bob LearnedCommented:
If you are talking about .NET 2.0 (2005), then you could do asynchronous data writes:

ADO.NET 2.0: The Data Access Classes Nobody Learned About
http://www.devx.com/SummitDays/Article/30806

Bob
0
 
negenAuthor Commented:
.net 2.0 yes, ado- no
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Bob LearnedCommented:
>>loads it into sql
If you are loading it into SQL without ADO.NET, then how are you doing it?

Bob
0
 
negenAuthor Commented:
Ok, I am not asking for any DB help.  I need to know any other way: besides thread.sleep to allow a program to finishe executing the items it has on the stack before going to the next line: for example....

Submit.Visible = False
        Button2.Visible = False
        Button1.Visible = False
        Sign_Panel.Visible = True
        Response.ContentType = "application/msword"
        Response.AddHeader("Content-Disposition", "attachment;filename=My__File.doc")

I need a pause here to wait for the file to save.

Response.Redirect("")

Sorry for any confusion
0
 
Bob LearnedCommented:
I have no idea.

Bob
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.