I have a web form that once filled out needs to kick off a lengthy process. Since I don’t want the user sitting there waiting for it to complete, I want to kick off the task and then take the user to another page to continue working.
Would doing this involve using an asynchronus process, and if so, does someone have an example of how to do this?
Basically you need a fire-n-forget implementation where you can just fire an async operation without waiting for it to finish.
Check out the following answer on a related question.
The code is in C#.Net, but vb.net should be similar.
Edit: Vb.net Solution:
This is the vb.net solution to fire a web method asynchronously:
Consider your web method as follows:
Now to call the web method asynchronously you can do either of the following depending your version of .Net:
.Net 3.5 (I am not sure if it works in 2.0)
Make sure to set Async=”true” in your Page directive
And in the code behind:
.Net 2.0/ 1.0
No need to set Async=”true”
And in the code-behind: