Multi threading in ASP,Net without sessions

  • Thread starter Thread starter Krishna prasad V.R
  • Start date Start date
K

Krishna prasad V.R

Hi,
I've read lots of postings about multithreading in asp.net. All the
samples use sessions to get the work done. A typical sample starts the
thread in one page and goes to another page for checking the status of
the thread using sessions.
I wanted to know the background thread life cycle using a single web
page and notifying the same page once it is done with its work. I have
a huge set of data to be loaded on to a datagrid on a button click on
the page without redirecting to some other page.
Is there a way to do this?

Thanks in advance
-kitty
 
The lifetime of the page lasts exactly as long as it is processed on the
server. Once the page is finished being processed and sent to the client, it
is gone. This is why the refresh method works because it provides the
illusion that the page is still being processed on the server. You'd have to
either keep the page executing on the server (with a sleep of some sort)
while the thread is executing so that when it is done, then the results can
be added to the page before sending to the client, or cause the page to
constantly refresh so that when the thread is done, a new page request is
being executed.
 
Back
Top