Connecting Tech Pros Worldwide Forums | Help | Site Map

DIV runat=server vs PANEL

robert@orisoft.co.uk
Guest
 
Posts: n/a
#1: Sep 7 '06
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!


Peter Bromberg [C# MVP]
Guest
 
Posts: n/a
#2: Sep 7 '06

re: DIV runat=server vs PANEL


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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"robert@orisoft.co.uk" wrote:
Quote:
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!
>
>
Karl Seguin [MVP]
Guest
 
Posts: n/a
#3: Sep 7 '06

re: DIV runat=server vs PANEL


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

--
http://www.openmymind.net/
http://www.codebetter.com/


"Peter Bromberg [C# MVP]" <pbromberg@yahoo.nospammin.comwrote in message
news:BD6F8BFB-B93A-4EF9-B2C1-036B7DEF35CB@microsoft.com...
Quote:
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
>
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
>
>
>
>
"robert@orisoft.co.uk" wrote:
>
Quote:
>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!
>>
>>

Peter Bromberg [C# MVP]
Guest
 
Posts: n/a
#4: Sep 7 '06

re: DIV runat=server vs PANEL


Good point, Karl. And there are other server controls with similar
browser-specific rendering behavior that you don't get with thier generic
HTML cousins.
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Karl Seguin [MVP]" wrote:
Quote:
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
>
--
http://www.openmymind.net/
http://www.codebetter.com/
>
>
"Peter Bromberg [C# MVP]" <pbromberg@yahoo.nospammin.comwrote in message
news:BD6F8BFB-B93A-4EF9-B2C1-036B7DEF35CB@microsoft.com...
Quote:
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"robert@orisoft.co.uk" wrote:
Quote:
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!
>
>
>
>
>
Closed Thread