DIV runat=server vs PANEL

  • Thread starter Thread starter robert
  • Start date Start date
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!
 
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
 
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
 
Back
Top