M
Martin Payne
Say I want to write a page that, when delivered, displays
a button labelled 'start'. When the button is pressed, a
process is initiated server-side that, say, writes random
values to a database table every second. And, at the
same time, the page no longer displays a start button but
begins displaying the contents of the database table,
refreshing every 5 seconds.
I have two questions. Firstly, how would I get an aspx
page to kick off a process and return a page before that
process is finished (the process will continue running in
the background). I've already figured how to stop the
process when needed (I just set a flag somewhere that the
process checks on each iteration, when I want the process
to stop I change the flag), I just can't figure how to
start the process and deliver a new page without waiting
for the proess to complete.
And, secondly, how do I get the page that displays the
table contents to refresh every 5 seconds?
Thanks
Martin
a button labelled 'start'. When the button is pressed, a
process is initiated server-side that, say, writes random
values to a database table every second. And, at the
same time, the page no longer displays a start button but
begins displaying the contents of the database table,
refreshing every 5 seconds.
I have two questions. Firstly, how would I get an aspx
page to kick off a process and return a page before that
process is finished (the process will continue running in
the background). I've already figured how to stop the
process when needed (I just set a flag somewhere that the
process checks on each iteration, when I want the process
to stop I change the flag), I just can't figure how to
start the process and deliver a new page without waiting
for the proess to complete.
And, secondly, how do I get the page that displays the
table contents to refresh every 5 seconds?
Thanks
Martin