473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Update message on web page while processing

I'm building a web utility to do some processing that will run for several
hours. Assume I have a valid reason for using the web for the utility.
During the process I'd like to display an update on the job's status while
not stopping the process that is running. It does not need to be pretty.
I'd be quite happy with a quick Response.Write("Job has finished consuming
300 of 9356 bananas"); or similar. I don't care if the message is replaced
or appended to.

What is the easiest (doesn't need to be pretty on the UI) method for posting
information back to the page while continuing to process?

Thanks!

Mark
Oct 26 '06 #1
6 2942

Mark wrote:
I'm building a web utility to do some processing that will run for several
hours. Assume I have a valid reason for using the web for the utility.
During the process I'd like to display an update on the job's status while
not stopping the process that is running. It does not need to be pretty.
I'd be quite happy with a quick Response.Write("Job has finished consuming
300 of 9356 bananas"); or similar. I don't care if the message is replaced
or appended to.

What is the easiest (doesn't need to be pretty on the UI) method for posting
information back to the page while continuing to process?

Thanks!

Mark
Hi Mark,

One of the simplest solutions for this is to have the web application
trigger a standard application, i.e. a command line application on the
server, which will actually do the processing for you. You could then
refresh a web page every few seconds, or minutes, which will check for
an indicator that the processing is complete.

The command line application, in this situation, could write a simple
text file to a directory to indicate that it has finished.

There are problems with this solution, i.e. what happens if the
application is launched more than once. I used to run a similar set up
some years ago for live reports that took 10 minutes or so to complete.
The web application fired off a PERL script that did the processing,
while the web page checked for the existance of a named file. The file
name was was made up with a unique identifier and this name was passed
to the PERL script so that any one running the report would see their
version. Not ideal but it did the job at the time.

Hopefully this will give you some pointers as to what you might be able
to achieve.

Steve

Oct 26 '06 #2
Can you use the web to start the process and check on it, and use a service
on the web server to do the job - that makes life very simple and will make
creating a solution very simple also. Otherwise, spawn your intial request
into a frameset, and have one frame page request the job starts, and the
other polling for status. You could use an iframe if you dont want to use a
traditional frameset.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark" <ma*********@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
I'm building a web utility to do some processing that will run for several
hours. Assume I have a valid reason for using the web for the utility.
During the process I'd like to display an update on the job's status while
not stopping the process that is running. It does not need to be pretty.
I'd be quite happy with a quick Response.Write("Job has finished consuming
300 of 9356 bananas"); or similar. I don't care if the message is
replaced or appended to.

What is the easiest (doesn't need to be pretty on the UI) method for
posting information back to the page while continuing to process?

Thanks!

Mark


Oct 26 '06 #3
Thanks to both of you for your replies. Unfortunately I'm bound to actually
running the process from the web page.

If I go the Frame route ... let's talk about the page that monitors the job.
What javascript or HTML tag is required to autopost back every minute or so
to check on the status of the job?

Thanks again.

Mark

"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:oK********************@eclipse.net.uk...
Can you use the web to start the process and check on it, and use a
service on the web server to do the job - that makes life very simple and
will make creating a solution very simple also. Otherwise, spawn your
intial request into a frameset, and have one frame page request the job
starts, and the other polling for status. You could use an iframe if you
dont want to use a traditional frameset.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark" <ma*********@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
>I'm building a web utility to do some processing that will run for
several hours. Assume I have a valid reason for using the web for the
utility. During the process I'd like to display an update on the job's
status while not stopping the process that is running. It does not need
to be pretty. I'd be quite happy with a quick Response.Write("Job has
finished consuming 300 of 9356 bananas"); or similar. I don't care if
the message is replaced or appended to.

What is the easiest (doesn't need to be pretty on the UI) method for
posting information back to the page while continuing to process?

Thanks!

Mark



Oct 26 '06 #4
You could just use a meta refresh

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark" <ma*********@nospam.nospamwrote in message
news:ew****************@TK2MSFTNGP05.phx.gbl...
Thanks to both of you for your replies. Unfortunately I'm bound to
actually running the process from the web page.

If I go the Frame route ... let's talk about the page that monitors the
job. What javascript or HTML tag is required to autopost back every minute
or so to check on the status of the job?

Thanks again.

Mark

"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:oK********************@eclipse.net.uk...
>Can you use the web to start the process and check on it, and use a
service on the web server to do the job - that makes life very simple and
will make creating a solution very simple also. Otherwise, spawn your
intial request into a frameset, and have one frame page request the job
starts, and the other polling for status. You could use an iframe if you
dont want to use a traditional frameset.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Mark" <ma*********@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl. ..
>>I'm building a web utility to do some processing that will run for
several hours. Assume I have a valid reason for using the web for the
utility. During the process I'd like to display an update on the job's
status while not stopping the process that is running. It does not need
to be pretty. I'd be quite happy with a quick Response.Write("Job has
finished consuming 300 of 9356 bananas"); or similar. I don't care if
the message is replaced or appended to.

What is the easiest (doesn't need to be pretty on the UI) method for
posting information back to the page while continuing to process?

Thanks!

Mark




Oct 26 '06 #5
hejdig.

Search for AJAX. MSs implementation was called Atlas earlier.
AJAX makes heavy use of HTTPRequest.

http://groups.google.com/group/comp....81be5498cd0af3
andor
http://jibbering.com/2002/4/httprequest.html
andor
http://javascript.faqts.com/

Note that IE6 behaves differently from the rest of the world but this is
supposedly fixed in IE7.

Serverside has to start a new process which writes its progress to a
database or something.
Clientside starts a timer to make HTTPRequests to a page that checks the
status of the process.

HTH

/OF

-------

Thanks to both of you for your replies. Unfortunately I'm bound to
actually running the process from the web page.
If I go the Frame route ... let's talk about the page that monitors the
job. What javascript or HTML tag is required to autopost back every minute
or so to check on the status of the job?
"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:oK********************@eclipse.net.uk...
>Can you use the web to start the process and check on it, and use a
service on the web server to do the job - that makes life very simple and
will make creating a solution very simple also. Otherwise, spawn your
intial request into a frameset, and have one frame page request the job
starts, and the other polling for status. You could use an iframe if you
dont want to use a traditional frameset.
>"Mark" <ma*********@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl. ..
>>I'm building a web utility to do some processing that will run for
several hours. Assume I have a valid reason for using the web for the
utility. During the process I'd like to display an update on the job's
status while not stopping the process that is running. It does not need
to be pretty. I'd be quite happy with a quick Response.Write("Job has
finished consuming 300 of 9356 bananas"); or similar. I don't care if
the message is replaced or appended to.
What is the easiest (doesn't need to be pretty on the UI) method for
posting information back to the page while continuing to process?

Oct 26 '06 #6
Hi Mark,

As other members have mentioned, you have many approaches to query the
running status from server-side:

** use html meta tag to refresh the page constantly:

http://webdesign.about.com/od/metata.../aa080300a.htm

** use client script to postback the html page e.g.

document.forms[0].submit()

http://www.javascript-coder.com/java...m-submit.phtml

** In ASP.NET 2.0, there provides AJAX like script callback can even help
you call a server-side page fucntion without postback the page.e.g.

#Implementing Client Callbacks Without Postbacks in ASP.NET Web Pages
http://msdn2.microsoft.com/en-us/library/ms178208.aspx

Hope also helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Oct 27 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Craig Keightley | last post by:
I need to create a form using multiple quantities that can be updated by one single update. eg: (HTML PAGE) <form method="post" enctype = "multipart/formdata"> <? do { ?> <?php echo...
7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
2
by: Colin Steadman | last post by:
Part No Description Quantity 45643 Random part 10 45678 Another Random part 7 98944 And another 1 <submit button> ...
4
by: Bob | last post by:
Below is sample code that illustrates what I'm trying to do. For sake of brevity I didn't include the properties of buildBtn that determine what data to request. The problem is I never see...
2
by: serge | last post by:
/* This is a long post. You can paste the whole message in the SQL Query Analyzer. I have a scenario where there are records with values pointing to wrong records and I need to fix them using an...
1
by: radha | last post by:
hi friend Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access Also how do we show a page from another page,for eg i am in page1.aspx and...
2
by: Tracey | last post by:
Sorry for the repeated post. I tried to update a record in database using SqlCommand.ExecuteNonQuery( ) method (I failed using SqlDataAdapter). I traced the above statement and found that it returned...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.