473,387 Members | 1,579 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,387 software developers and data experts.

How do I start writing a table to the browser berfore all rows are rendered?

Hi!

I have a really large and complex table.
The table may consist of several thousand rows.
When I render the table with asp.net web controls the control won't stream
out to the browser before the appending of rows is completed.
The table is created in a custom web control. I know I can use
Response.Write to directly output to the client, but I'd like to know if
there is another way.

cheers,
mortb
Apr 10 '07 #1
4 1279
This is how IE behaves (not sure about other browsers). The table is being
streamed to the browser, but IE will only render it when it has the complete
table. It is only when it gets all rows that it can know how the table is
to look.

"mortb" <mo***@nospam.nospamwrote in message
news:u0**************@TK2MSFTNGP03.phx.gbl...
Hi!

I have a really large and complex table.
The table may consist of several thousand rows.
When I render the table with asp.net web controls the control won't stream
out to the browser before the appending of rows is completed.
The table is created in a custom web control. I know I can use
Response.Write to directly output to the client, but I'd like to know if
there is another way.

cheers,
mortb

Apr 10 '07 #2
Generally you need to close the table tag before the browser is able to
render the whole table. In this case you could also try the table-layout
attribute :
http://msdn.microsoft.com/library/de...ablelayout.asp
that should allows to render one row at a time (you'll need also to disable
buffering).

My personal preference would be likely to page data if possible (and/or
rendering filtered data). Are those rows browsed by a user ? Doesn't he have
a search or filtering mechanism to find what he is interested among those
several thousands of rows ?

Please let us know if table-layout worked...
"mortb" <mo***@nospam.nospama écrit dans le message de news:
u0**************@TK2MSFTNGP03.phx.gbl...
Hi!

I have a really large and complex table.
The table may consist of several thousand rows.
When I render the table with asp.net web controls the control won't stream
out to the browser before the appending of rows is completed.
The table is created in a custom web control. I know I can use
Response.Write to directly output to the client, but I'd like to know if
there is another way.

cheers,
mortb

Apr 10 '07 #3
mortb wrote:
Hi!

I have a really large and complex table.
The table may consist of several thousand rows.
When I render the table with asp.net web controls the control won't stream
out to the browser before the appending of rows is completed.
The table is created in a custom web control. I know I can use
Response.Write to directly output to the client, but I'd like to know if
there is another way.
No, there is no other way. When you are using server controls, none of
the final html code exist before all server controls are added to the page.

You can use Response.Write and Response.Flush to create output and flush
it to the browser. Don't make a flush after each row, though. Then you
would be sending each row in a separate TCP/IP package, which would
produce a huge amount of overhead.

Also consider what Patrice said about paging and filtering. The user
might not even want what you are trying to do now.

--
Göran Andersson
_____
http://www.guffa.com
Apr 10 '07 #4
There is paging, the customer wants to be able to show the whole result at a
time, though. DOH! ;-)

If I'd draw the table usining response write I guess that means that that
the whole page would have to be output using response write wouldn't it lead
to better performance if I'd put the page in a httphandler instead of an
aspx page?

thanks for the replies!
/mortb

"Göran Andersson" <gu***@guffa.comwrote in message
news:ON**************@TK2MSFTNGP06.phx.gbl...
mortb wrote:
>Hi!

I have a really large and complex table.
The table may consist of several thousand rows.
When I render the table with asp.net web controls the control won't
stream out to the browser before the appending of rows is completed.
The table is created in a custom web control. I know I can use
Response.Write to directly output to the client, but I'd like to know if
there is another way.

No, there is no other way. When you are using server controls, none of the
final html code exist before all server controls are added to the page.

You can use Response.Write and Response.Flush to create output and flush
it to the browser. Don't make a flush after each row, though. Then you
would be sending each row in a separate TCP/IP package, which would
produce a huge amount of overhead.

Also consider what Patrice said about paging and filtering. The user might
not even want what you are trying to do now.

--
Göran Andersson
_____
http://www.guffa.com

Apr 11 '07 #5

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

Similar topics

7
by: Bruce W...1 | last post by:
I made my first PHP page that uses includes. http://php.didah.com/main.php But I can't get rid of a gap (about 5 pixels) between the table rows. The content of each include file is one line like...
6
by: David D. | last post by:
I want to be able to access cells within an HTML table, via computed row number and column number. I was considering using oTableID.children and oTR.children arrays. My question is what...
10
by: Peter Kirk | last post by:
Hi there can someone please help me with creating dynamic content in a table? For example, see the below javascript and html - why is a new row not created in the table when I click the button?...
6
by: Christopher Benson-Manica | last post by:
I have some markup like the following: <form> <table> <script> <!-- Write the table markup //--> </script> </table> <form>
2
by: Liming | last post by:
hello, I have the follwoing code <div id="detailtable" style="visibility:hidden"> <table id="detailtablehidden" width="100%" border="0"> .... </table> </div>
7
by: klynn | last post by:
I'm wondering what the best way to do the following: I have a page with a table. I built a custom class that creates a System.Web.UI.WebControls table object and return it to the webpage as a...
1
by: Sorrow | last post by:
I'm wondering if there is anything out there that discusses the above? I need to be able to add and remove TDs and TRs to a table all the while maintaining the overall layout. For example, if the...
12
by: enrique | last post by:
Does anyone know what the upper limit is to the number of rows you can dynamically add to an HTML table, using Javascript? I tried to make a table consisting of over 74,000 rows and Firefox stops...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
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 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.