tommyb said:I have a web application with a dbase query.
This takes some time.
I just want to inform the user that the query is started.
That's why I want to use multi-threading.
First thread on the background processing the query.
Second thread sending a message to the client (=changing the text of a label on the same page into "please wait..").
Is this possible?
Thankx!
private ThreadStart m_objStarter = null;
private Thread m_objWorker = null;
//ensure the thread is not started a second time.
if (null == m_objWorker)
{
//Create the thread starter object. It points to the DoTheLongStuff method that does the long stuff.
m_objStarter = new ThreadStart(DoTheLongStuff);
//Create a new thread.
m_objWorker = new Thread(m_objStarter);
//Start the new thread
m_objWorker.Start();
}