Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Pass Values Back from Running Thread to Primary Server Code (VB.Net)

Pass Values Back from Running Thread to Primary Server Code (VB.Net)

Pass Values Back from Running Thread to Primary Server Code (VB.Net)

I can pass a Session variable TO a thread as a parameter and use it there as needed. And there are other ways of accomplishing that.

BUT I want to have the Thread routine run a process and calculate a value (e.g. a Percent Complete) which I need to have sent BACK to the primary server code. Perhaps out of my ignorance, the easiest way would appear to be by using something like a Session variable.

Yes, I have read about having the Thread writing out the value to some table/file/etc. and then having the primary code read that value, but that seems pretty time-consuming. I am hoping that there is another easier/faster way.

I am looking for a progressively updated value from the Thread to be passed in some manner BACK to the Primary server code where it can be reflected in an AJAX UpdatePanel ProgressBar by the panel's 'trigger' - the Timer.Tick event.

Any assistance/advice/suggestions you might have to offer would be greatly appreciated.


RE: Pass Values Back from Running Thread to Primary Server Code (VB.Net)

OK, again with MUCH more web searching it looks as though I should possibly try the newer BackgroundWorker approach instead of merely using the older Thread approach.

Another option might be the also newer Task approach, but I don't think that would work for what I am attempting to do.

I'll give it a try and report back here when I know more and/or run into problems with that approach.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close