DIV runat=server vs PANEL

R

robert

Just wondered what the difference is between a div with runat=server vs
panel. I use these two tags when I want to show/hide a section of the
page. I know Microsoft push for developers to use the web form controls
rather than the html ones, but if I can use a html control with
runat=server wouldnt that be faster?

Thanks!
 
G

Guest

Robert,
Faster? Not particularly, since they both render as a Div. The server
control is there to provide you with design-time and server-side programming
conveniences. If using a runat=server div floats your boat better, have fun.
Peter
 
K

Karl Seguin [MVP]

Just a point of clarification. Panels will down render to tables for some
browsers. I know in 1.x, they would (incorrectly) down render to tables for
firefox by default...I'm pretty sure that's fixed in 2.0, but I'm sure there
are browsers out there that will cause the same to happen.

I'm not sure if that makes panels better or not mind you...just different.

Karl
 

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,772
Messages
2,569,591
Members
45,102
Latest member
GregoryGri
Top