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 1 1071
"Martin Payne" <mc*****@ozemail.com.au> wrote in message news:<00****************************@phx.gbl>... 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.
I would problably do it this way:
when the page loads , in the Page_Load event, check for a flag that
switches to true with the button is pressed, and do the random DB
process in a simple loop. Use the clock to check for seconds and do it
just 5 times (5 seconds). After that, reload the page.
This way, during postback the process will not continue however. If
that is what you really want you might want and try to find out more
about threads. But I don't think it will be easy to safely implement
it.
Freek Versteijn And, secondly, how do I get the page that displays the table contents to refresh every 5 seconds?
Thanks Martin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mACKnIFE |
last post by:
Hi list!
I've just finished reading the nice book: "Data Modeling and
Relational Database Design Volume 1 - Student Guide", by Jan
Speelpenning, Patrice Daux and Jeff Gallus, published by Oracle...
|
by: Daniel Ladd |
last post by:
Hi,
I have a problem with a conceptual graph in c++.
I have a oist of structures like this:
typedef struct Conceptual
{ char* Name;//Rappresenta la parola da mettere nel grafo
Conceptual* Next;...
|
by: M Davidson |
last post by:
Hello all,
Thank you in advance for any guidance.
(The standard form/subform won't work because my users will mess up and not
enter a value for a category. I don't mean to speak ill of...
|
by: kuhni |
last post by:
Hi everybody!
Writing this time, I'm really desperate. Basically, I have a
conceptual problem of how to solve a certain "problem" in MS Access
97.
General objective:
In order to categorise...
|
by: shirsoft |
last post by:
I having some conceptual prob switching to c#
I want to make a bitmap obj, and pass it to my func which will
actually set its width, height and data ptr. But i am at loss as to
how to do it
...
|
by: omyomyomy |
last post by:
i have been set a task which i having problems with.
i have to carry out the task of:
The task is expected to be completed before the end of the second laboratory session. A full account on...
|
by: M_Mann |
last post by:
Hello,
Pls excuse if you consider this off-topic. Conceptual artists seek
programmers here.
We are authors of "Exhibition of Living Managers" (MANAGEX,
www.managex.info) which is is global...
|
by: RSH |
last post by:
I am still trying to grasp the use of real world Objects and how to
conceptualize them using a business scenerio.
What I have below is an outline that I am wrestling with trying to figure
out a...
|
by: cppnow |
last post by:
Hello. I have a strange conceptual problem I'm trying to think about.
I would like to build a library that allows the user to do the
following:
1) User defined types:
The user defines their...
|
by: AliRezaGoogle |
last post by:
Dear Members,
I have a problem in the concepts of Monit.Enter and Monitor.Exit
(Before everything I should say that I know how to solve this problem
by
using Monitor.Wait and I do not need a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |