Issue:How to update Server Control(TextBox) from a thread running in code behind in vb.net.

  • Thread starter Jitendra Singh via .NET 247
  • Start date

J

Jitendra Singh via .NET 247

If I start a thread in code behind and that thread, after the page got loaded, want to update the value in TextBox(Server control or HTML control). It gives no error but value is not shown on the page. Pls Give the solution If 1 know....Thanks...
 
Ad

Advertisements

B

Brock Allen

Starting a new Thread causes two paths of execution. The first path which
was the Request into your webserver completes the request and thus it's long
gone by the time your second thread tries to update a TextBox on the page.
You're starting to play with fire, so be careful until you've spent a lot
of time testing and understanding what you're doing.

There's a good article by Fritz that discusses how to create asychronous
pages which might help get you going down the right track:

http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx
 

Top