Performance-related questions about an ASP.NET page...

Discussion in 'ASP .Net' started by Sammy, Feb 15, 2005.

  1. Sammy

    Sammy Guest

    1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
    2- Is it better to form your response (HTML page) result from your ASP.NET
    page mostly using server side controls, or HTML controls. For example, if
    you want to display the word "Welcome" is it better to use an asp:label
    control or just type it using a P tag?

    Thank you.
     
    Sammy, Feb 15, 2005
    #1
    1. Advertising

  2. Sammy

    Karl Seguin Guest

    Sammy:
    The table/div issue has nothing to do with ASP.Net...it's more a general
    html question...a nice thing about tables is how well they let you structure
    data using server-side controls via the Table, TableRow and TableCell
    controls. If you do a google search for "Table vs Div" you'll get a lot of
    results. The main issue i believe is accessibility....

    Your second question is loaded, but i'll answer it as best as possible.
    First off, it's pretty obvious that

    #1
    <p>Hello World</p>

    is going to be faster than

    #2
    <Asp:label id="blah" runat="server" />
    ....
    OnPage_Load
    blah.text = "hello world"
    end sub

    in the first example you are simply sending it as plain text to the browser
    to render. In the 2nd example, ur doing the same thing, but before that you
    are creating an object on the server and doing some other magic.

    The real point though is that it shouldn't matter. The debate is purely
    speculative...the microsecond (literally) that you'll save in one way
    doesn't equate much compared to the flexibility you gain the other. If the
    flexiliby isn't, and never will be needed, then do it the first way..

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Sammy" <> wrote in message
    news:%...
    > 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
    > 2- Is it better to form your response (HTML page) result from your ASP.NET
    > page mostly using server side controls, or HTML controls. For example, if
    > you want to display the word "Welcome" is it better to use an asp:label
    > control or just type it using a P tag?
    >
    > Thank you.
    >
    >
     
    Karl Seguin, Feb 15, 2005
    #2
    1. Advertising

  3. Sammy

    Sammy Guest

    Thank you!

    "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
    wrote in message news:...
    > Sammy:
    > The table/div issue has nothing to do with ASP.Net...it's more a general
    > html question...a nice thing about tables is how well they let you
    > structure
    > data using server-side controls via the Table, TableRow and TableCell
    > controls. If you do a google search for "Table vs Div" you'll get a lot
    > of
    > results. The main issue i believe is accessibility....
    >
    > Your second question is loaded, but i'll answer it as best as possible.
    > First off, it's pretty obvious that
    >
    > #1
    > <p>Hello World</p>
    >
    > is going to be faster than
    >
    > #2
    > <Asp:label id="blah" runat="server" />
    > ...
    > OnPage_Load
    > blah.text = "hello world"
    > end sub
    >
    > in the first example you are simply sending it as plain text to the
    > browser
    > to render. In the 2nd example, ur doing the same thing, but before that
    > you
    > are creating an object on the server and doing some other magic.
    >
    > The real point though is that it shouldn't matter. The debate is purely
    > speculative...the microsecond (literally) that you'll save in one way
    > doesn't equate much compared to the flexibility you gain the other. If
    > the
    > flexiliby isn't, and never will be needed, then do it the first way..
    >
    > Karl
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    >
    >
    > "Sammy" <> wrote in message
    > news:%...
    >> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
    >> 2- Is it better to form your response (HTML page) result from your
    >> ASP.NET
    >> page mostly using server side controls, or HTML controls. For example, if
    >> you want to display the word "Welcome" is it better to use an asp:label
    >> control or just type it using a P tag?
    >>
    >> Thank you.
    >>
    >>

    >
    >
     
    Sammy, Feb 15, 2005
    #3
    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. Cris Rock

    Performance related Question.....

    Cris Rock, Feb 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    323
    Stefano Mostarda
    Feb 12, 2004
  2. Maxwell Hammer
    Replies:
    7
    Views:
    669
    Peter Hansen
    Jun 18, 2005
  3. Replies:
    9
    Views:
    744
  4. , India
    Replies:
    1
    Views:
    321
    Richard Harter
    Mar 26, 2007
  5. Ryan Liu
    Replies:
    3
    Views:
    2,262
    Ryan Liu
    Mar 27, 2009
Loading...

Share This Page