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

  • Thread starter Thread starter Jitendra Singh via .NET 247
  • Start date 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...
 
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

-Brock
DevelopMentor
http://staff.develop.com/ballen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top