Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Ken Dopierala Jr.
Guest
 
Posts: n/a
#1: Nov 18 '05
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.


Curt_C [MVP]
Guest
 
Posts: n/a
#2: Nov 18 '05

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


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 :}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:eGjRe3U2DHA.264@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
HTML[color=blue]
> 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.[/color]
The[color=blue]
> 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.
>
>[/color]


Curt_C [MVP]
Guest
 
Posts: n/a
#3: Nov 18 '05

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


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.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:eGjRe3U2DHA.264@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
HTML[color=blue]
> 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.[/color]
The[color=blue]
> 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.
>
>[/color]


John Timney \(Microsoft MVP\)
Guest
 
Posts: n/a
#4: Nov 18 '05

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


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>
----------------------------------------------

"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:eGjRe3U2DHA.264@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
HTML[color=blue]
> 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.[/color]
The[color=blue]
> 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.
>
>[/color]


Kevin Spencer
Guest
 
Posts: n/a
#5: Nov 18 '05

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


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.

"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:eGjRe3U2DHA.264@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
HTML[color=blue]
> 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.[/color]
The[color=blue]
> 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.
>
>[/color]


Craig Deelsnyder
Guest
 
Posts: n/a
#6: Nov 18 '05

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


Ken Dopierala Jr. wrote:[color=blue]
> 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.
>
>[/color]

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.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Closed Thread