473,394 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DIV runat=server vs PANEL

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!

Sep 7 '06 #1
3 4558
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


"ro****@orisoft.co.uk" wrote:
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!

Sep 7 '06 #2
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]" <pb*******@yahoo.nospammin.comwrote in message
news:BD**********************************@microsof t.com...
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


"ro****@orisoft.co.uk" wrote:
>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!


Sep 7 '06 #3
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:
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]" <pb*******@yahoo.nospammin.comwrote in message
news:BD**********************************@microsof t.com...
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


"ro****@orisoft.co.uk" wrote:
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!



Sep 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary Bagen | last post by:
Hello, I am working on a page transition scheme and was wondering what the quickest way is to find out which ASP.NET controls need to be inside a form with runat=server. I've determined that...
4
by: Matthew Louden | last post by:
It happend to me more than once. When I create web controls or move the positions in VS.NET, I encountered the following run-time errors: It doesn't matter what controls I create, the following...
9
by: Jay | last post by:
Where is there a good article/description on why everything is runat=server. I just can't seem to grasp why ALL tags (even table tags) are runat server in dotnet. Thank You
3
by: testemail | last post by:
Hello How do I perform a variable replacement in ASP.NET when I am using the runat=server clause to generate a table - it was simple in ASP With ASP : ---------- <HTML> .... <BODY>
3
by: Russ | last post by:
I have a usercontrol that is loaded by a webform. The usercontrol populates a datagrid which users need the capability to export data from the grid to Excel. The problem is that when I attempt to...
4
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I...
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
4
by: John Dalberg | last post by:
I am looking at a problem which is preventing my code to get a reference to any asp control inside a div section which has a runat=server attribute. This can be reproduced in a simple test:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.