Show the progress of an asp.net page while loading..

J

jcfilth

Hello,

I have created an asp.net web page with 3 datagrids. Every datagrid
binds to a diferent sql query, against a sql server. I first bind
one, then the other and then the last, all using code on Page_Load
event.

When I load this page, the navigator doesn't show anything until the
page load finish. Then I can see the results of the 3 datagrids.

What I want is to bind the first datagrid, show the results and
continue binding the second one, show the results and bind the
third.

In CLASSIC ASP I used Response.Buffer=true at the beginning of my code
and Response.Flush every time i wanted to show the results. I've
tried to use this commands with asp.net but it doesn't function.

Is it possible to do this? How?

Thank you very much.
Jc
 
H

Hermit Dave

nope what you want to do is not possible...

you are binding the datagirds in page load event and you want to render them
at one at a time so that user can see some data...

but webcontrols are not rendered untill page_load is finished... any if any
events are handled. It is at this point that render is called.. and one of
the calls it
rendering the child objects.. this is where actual data is written to the
response.outputstream

you only other option is to not use datagrid rather use classic
Response.Write and output your own html for the grid generation (table like
we used to use in classic asp)

(or what you could potentially do is reduce the amount of data that is
fetched... use paging... query only for records you need (custom paging)
even resort to caching if it helps..

--

Regards,

HD
jcfilth said:
Hello,

I have created an asp.net web page with 3 datagrids. Every datagrid
binds to a diferent sql query, against a sql server. I first bind
one, then the other and then the last, all using code on Page_Load
event.

When I load this page, the navigator doesn't show anything until the
page load finish. Then I can see the results of the 3 datagrids.

What I want is to bind the first datagrid, show the results and
continue binding the second one, show the results and bind the
third.

In CLASSIC ASP I used Response.Buffer=true at the beginning of my code
and Response.Flush every time i wanted to show the results. I've
tried to use this commands with asp.net but it doesn't function.

Is it possible to do this? How?

Thank you very much.
Jc
 
K

Ken Cox [Microsoft MVP]

You might want to check out this technique:

Progress Bar in Web Application

http://www.myblogroll.com/Articles/progressbar/

and this one:

http://www.ddconsult.com/blogs/illuminati/archives/000089.html


jcfilth said:
Hello,

I have created an asp.net web page with 3 datagrids. Every datagrid
binds to a diferent sql query, against a sql server. I first bind
one, then the other and then the last, all using code on Page_Load
event.

When I load this page, the navigator doesn't show anything until the
page load finish. Then I can see the results of the 3 datagrids.

What I want is to bind the first datagrid, show the results and
continue binding the second one, show the results and bind the
third.

In CLASSIC ASP I used Response.Buffer=true at the beginning of my code
and Response.Flush every time i wanted to show the results. I've
tried to use this commands with asp.net but it doesn't function.

Is it possible to do this? How?

Thank you very much.
Jc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top