asp.net - How to pass parameter to asynchronous task in c# -
during asp.net web request need kick off asynchronous task , return control web page. can show me code calling below method? clear, want function called async , web request complete returning control calling page while function still processing.
private void functiontocall(iinterface objectiwanttopassin) { // stuff }
you'll want spawn thread creating
task task = task.factory.startnew(action, "arg");
then you'll want maybe when task done:
task.continuewith(anotheraction);
of course action , otheraction void methods in case.
Comments
Post a Comment