.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

assemble table programatically - little help? (asp.net 2.0 c#)

Hi,

I'm building a table that will sit on a page and hold thumbnail images and a bit of text. Its 5 cells wide and could be any number of rows. Don't actually have a problem assembling it but the client wants the table to fill up from the top-right - that is, if there are only 3 items on a row for example they will be on the right side of the table.

I'm building the 5 cells for each row even if some are empty, so that the cells always sit in the right place, but I can't see how to do this from-the-right trick.

At the moment I'm populating the cells as I go along, add a cell + content, add next cell + content - but the only way I can see to do this is to add all the cells first then do a FindControl on each one to put the data in, but that seems a bit long winded and slower(?).

Anyone have any suggestions?
surreal
Thursday, January 18, 2007
 
 
not touched C#

but the general rule ::=

control[ MAX - (RowNum mod MAX) ] = value ;

WHERE
rowNum starts at 0 in case you wondered.
MAX is 5 in your case.

Thursday, January 18, 2007
 
 
The web browser will decide when to fetch images and how many to fetch simultaneously.  It will usually get the in the order they appear in the html source.  The only way I can think of to gurantee load order is to load the page with dummy images and then use client side script to populate them with the real images.
JSmith Send private email
Friday, January 19, 2007
 
 
If you know the size of each cell in advance, you can drop the table and use right floated divs to hold the images.
outshider
Tuesday, January 23, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz