You could try to join() your thread to the existing thread actioning your
web request. This should pause your on_load method until the thread
concludes. Be warned though, your delaying the web server from responding
efficiently.
http://msdn.microsoft.com/library/de...jointopic1.asp
If your making a socket call, make sure you get a timeout invoked if the
call fails so the joined thread can return, otherwise your in trouble if the
thread fails to terminate. Thats one of the problems with sub-threading
events in asp.net.
You might want to consider instead making a webservice call within the load
method to invoke the socket and pass your value back, and make use of its
timeout ability to allow your load method to continue cleanly.
http://msdn.microsoft.com/library/de...meouttopic.asp
-- Regards
John Timney
Microsoft MVP
"charles" <ch**********@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Thank you, Bruce, for your promptive response!
Would you please tell me how to write in onload to wait for the thread
to complete?
I have 2 lines in Page_Load to start a thread:
readThread = new Thread( new ThreadStart( RunServer ) );
readThread.Start();
Thanks!
Charles
2/23