Do you use <table> or <asp:Table>?

K

Ken Dopierala Jr.

Hi,
This is just a query about what people use most. Up until today I've
been using <asp:Table> tags to build my tables. We just outsourced our HTML
design to a local guy and when I got it back today I was working with the
html <table> <tr> <td> etc. What a difference that makes, server controls
are even automatically declared in the code behind when using the generic
HTML controls. I think I'm going to switch over to using them solely. The
only drawback I've seen is that VS.Net doesn't format them as nicely as it
formats it's own server control tags. Are there any other advantages to
using the asp server controls for tables over generic HTML tags? Thanks.
Ken.
 
C

Curt_C [MVP]

ASP:Table is subject to the properties, methods, events, etc that are
defined.
The <table> tag is simply an html tag and has those limitations.
 
C

Curt_C [MVP]

Oh.... to answer your question.... BOTH...
If I need to manipulat it from server code I use a server table, if not I
use HTML table :}
 
J

John Timney \(Microsoft MVP\)

I use both, sometimes the asp:table tags dont lend themselves easily to
dynamic creation within user controls, like in templates for a hyperlink
control. If neccessary I will galdly step into using simple table tags....

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 
K

Kevin Spencer

Hi Ken,

It doesn't matter what people use most. What you should be doing is learning
the characteristics of these different kinds of programming elements so that
you can choose the most appropriate one for the given task.

To that end, I would suggest that you use the Control(s) that provides the
functionality that you require with the smallest footprint possible. In
general, the size of the footprint of a Server Control follows this
hierarchy:

HTML - Smallest Footprint
HTMLControls - Larger Footprint
WebControls - Largest Footprint

Custom Server Controls allow you more fine-grained ability to tune
performance, of course.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

Craig Deelsnyder

Ken said:
Hi,
This is just a query about what people use most. Up until today I've
been using <asp:Table> tags to build my tables. We just outsourced our HTML
design to a local guy and when I got it back today I was working with the
html <table> <tr> <td> etc. What a difference that makes, server controls
are even automatically declared in the code behind when using the generic
HTML controls. I think I'm going to switch over to using them solely. The
only drawback I've seen is that VS.Net doesn't format them as nicely as it
formats it's own server control tags. Are there any other advantages to
using the asp server controls for tables over generic HTML tags? Thanks.
Ken.

I use the HTML control in two instances: working with a UI guy (they
usually want to mock up a page and give it to you, and if really
complex, I sometimes don't want to touch it), or the HTML output is not
ideal. Usually the latter is not a problem with something like a table,
plus you can always override, etc.

As mentioned before, the table server control exposes more events,
methods, etc.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top