We help IT Professionals succeed at work.

Waiting for code to finish

negen
negen asked
on
Medium Priority
221 Views
Last Modified: 2010-04-23
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.
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
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

Author

Commented:
.net 2.0 yes, ado- no
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

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

Bob

Author

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
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2008

Commented:
I have no idea.

Bob
Commented:
Problem self resolved by using javascript:settimeout function, please close

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.