473,387 Members | 1,561 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,387 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 4557
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.