468,277 Members | 1,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,277 developers. It's quick & easy.

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

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.
Nov 19 '05 #1
2 1064
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" <sa***@picostation.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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.

Nov 19 '05 #2
Thank you!

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ux**************@TK2MSFTNGP09.phx.gbl...
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" <sa***@picostation.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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.


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Dave Theese | last post: by
12 posts views Thread by Fred | last post: by
115 posts views Thread by Mark Shelor | last post: by
6 posts views Thread by Mike | last post: by
7 posts views Thread by Michael D. Ober | last post: by
30 posts views Thread by galiorenye | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.