Web Form Progress Bar

  • Thread starter Thread starter aj
  • Start date Start date
A

aj

Alan, you can achieve this by using XMLHttp Async
functionality in a javascript file.

Create an aspx page in which execute long running SQL
query, then do an XMLhttp post to that page from a js
function.


In the javascript create 2 funtion
Call LoadData in the window onload event.

var objXMLReq;
function LoadData() {
objXMLReq = new ActiveXObject
("Microsoft.XMLHttp");
var DataUrl = 'http://localhost/Query.aspx';

objXMLReq.onreadystatechange =
ManageASyncXMLHTTPOperation;
objXMLReq.open("POST", DataUrl, true);
objXMLReq.setRequestHeader('Content-
type', 'text/xml');
objXMLReq.send();

//Display Progress bar("Retrieving data...");
}

function ManageASyncXMLHTTPOperationDTL() {
switch (objXMLReq.readyState) {

case 2, 3:
break;

case 4:
//Hide the progress bar
//Display the data
div.innherText=objXMLReq.responseText;
}
}
 
aj,

Thanks very much for your detailed reply.

I've had so many people tell me progress bars for backend SQL queries
couldn't be done in web forms.

Both your generous recommendation and the other extensive responses here
regarding multithreading convince me that there's always a way o do
something.

Regards,

Alan
 
Hi Alan,

I have replied your post in another
thread<microsoft.public.dotnet.framework.aspnet.webcontrols>, titled: <Web
Form Progress Bar Control>.

I past the link here for your reference:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=OiAxCajY
DHA.2448%40TK2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fq%3DWeb%2BForm%2BProgr
ess%2BBar%2BControl%2B%2Bv-lwang%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8
%26selm%3DOiAxCajYDHA.2448%2540TK2MSFTNGP09.phx.gbl%26rnum%3D1

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
| Reply-To: "Alan Z. Scharf" <[email protected]>
| From: "Alan Z. Scharf" <[email protected]>
| References: <#[email protected]>
<[email protected]>
| Subject: Re: Web Form Progress Bar
| Date: Thu, 14 Aug 2003 04:13:21 -0400
| Lines: 89
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3718.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3718.0
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 207-237-240-45.c3-0.nyw-ubr2.nyr-nyw.ny.cable.rcn.com
207.237.240.45
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:167771
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| aj,
|
| Thanks very much for your detailed reply.
|
| I've had so many people tell me progress bars for backend SQL queries
| couldn't be done in web forms.
|
| Both your generous recommendation and the other extensive responses here
| regarding multithreading convince me that there's always a way o do
| something.
|
| Regards,
|
| Alan
|
|
| | > Alan, you can achieve this by using XMLHttp Async
| > functionality in a javascript file.
| >
| > Create an aspx page in which execute long running SQL
| > query, then do an XMLhttp post to that page from a js
| > function.
| >
| >
| > In the javascript create 2 funtion
| > Call LoadData in the window onload event.
| >
| > var objXMLReq;
| > function LoadData() {
| > objXMLReq = new ActiveXObject
| > ("Microsoft.XMLHttp");
| > var DataUrl = 'http://localhost/Query.aspx';
| >
| > objXMLReq.onreadystatechange =
| > ManageASyncXMLHTTPOperation;
| > objXMLReq.open("POST", DataUrl, true);
| > objXMLReq.setRequestHeader('Content-
| > type', 'text/xml');
| > objXMLReq.send();
| >
| > //Display Progress bar("Retrieving data...");
| > }
| >
| > function ManageASyncXMLHTTPOperationDTL() {
| > switch (objXMLReq.readyState) {
| >
| > case 2, 3:
| > break;
| >
| > case 4:
| > //Hide the progress bar
| > //Display the data
| > div.innherText=objXMLReq.responseText;
| > }
| > }
| >
| > >-----Original Message-----
| > >Does anyone know of web form Progress Bar controls or
| > simulations for
| > > long-running SQLServer process?
| > >
| > > Is it possible to use a conceptual method such as
| > >
| > > 1. Have SQLServer post status updates or number of
| > seconds elapsed to
| > > database table, and
| > >
| > > 2. Have web form post commands to retrieve data from
| > the table based
| > >on a timer, but inhibit web form redrawing until
| > SQLServer table progress
| > >numbers
| > >pass certain threshholds?
| > >
| > > Thanks.
| > >
| > > Alan
| > >___________________________
| > >Alan Z. Scharf
| > >GrapeVine Systems
| > >New York City
| > >
| > >
| > >.
| > >
|
|
|
 
Back
Top