RE: Large table creation

Discussion in 'ASP .Net' started by Yan-Hong Huang[MSFT], Jun 25, 2003.

  1. Hello Jim,

    There should be no other way to do so. The for loop could be used to create
    a big talbe.

    Have you tested the page to see if it is really slow? The work is done by
    server side and should not hurt performance much.

    Please feel free to post here if you have any more concerns.

    Best regards,
    yhhuang
    VS.NET, Visual C++
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Got .Net? http://www.gotdotnet.com
    --------------------
    !Content-Class: urn:content-classes:message
    !From: "Jim McLeod" <>
    !Sender: "Jim McLeod" <>
    !Subject: Large table creation
    !Date: Tue, 24 Jun 2003 00:54:01 -0700
    !Lines: 32
    !Message-ID: <0b5301c33a25$c6616b20$>
    !MIME-Version: 1.0
    !Content-Type: text/plain;
    ! charset="iso-8859-1"
    !Content-Transfer-Encoding: 7bit
    !X-Newsreader: Microsoft CDO for Windows 2000
    !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    !Thread-Index: AcM6JcZhnNkE8opfTC6DHEaafa77MA==
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !Path: cpmsftngxa06.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154515
    !NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !Hi Guys,
    !
    !I'm using the following embedded 'For loops' to create
    !two pretty big tables. Lets say 100+ cells, by 100+ rows.
    !
    !=====================================
    !for(long RowCounter = 0; RowCounter < Rows; RowCounter++)
    !{
    ! TableRow = new
    ! System.Web.UI.HtmlControls.HtmlTableRow();
    !
    ! for(long CellCounter = 0; CellCounter < Cells;
    ! CellCounter++)
    ! {
    ! TableCell = new
    ! System.Web.UI.HtmlControls.HtmlTableCell();
    !
    ! TableRow.Cells.Add(TableCell);
    ! }
    !
    ! TableReference.Rows.Add(TableRow);
    !}
    !=====================================
    !
    !As you can imagine this code isn't the most efficient for
    !creating such large structures. Is there any .NET
    !Framework technique for speeding the creation of these
    !tables?
    !
    !Best regards,
    !
    !Jim...
    !
     
    Yan-Hong Huang[MSFT], Jun 25, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Williams
    Replies:
    2
    Views:
    1,155
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Rio
    Replies:
    4
    Views:
    1,228
  3. possibilitybox
    Replies:
    12
    Views:
    575
    Kent Johnson
    Apr 30, 2005
  4. Ketchup
    Replies:
    1
    Views:
    273
    Jan Tielens
    May 25, 2004
  5. Replies:
    5
    Views:
    955
    Xho Jingleheimerschmidt
    Apr 2, 2009
Loading...

Share This Page