473,394 Members | 1,831 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.

Panel PlaceHolder Div Difference?

What is the difference between a Panel and a <div> tag with
runat="server"? It seems that I can add child controls to either one
in a code-behind and they both render to a <div> anyway at runtime.

What is the difference between a Placeholder and a Div, other than a
Placeholder does not render at runtime?

Thanks.
Nov 18 '05 #1
2 9879
When you render the PlaceHolder, you will not see a div tag, unless you add it in, of course :)

Tu-Thac
www.ongtech.co

----- bdwise wrote: ----

What is the difference between a Panel and a <div> tag wit
runat="server"? It seems that I can add child controls to either on
in a code-behind and they both render to a <div> anyway at runtime

What is the difference between a Placeholder and a Div, other than
Placeholder does not render at runtime

Thanks

Nov 18 '05 #2
Panel and <div> are the same thing in HTML. The difference is that a
Panel is a web control, and it makes it easier to access the control's
method and properties in the code-behind. Making a <div> runat server
also allows you to access the properties in the code-behind, but not
as much compare to a Panel web control.

A Panel control requires more processing to generate HTML, while a
<div> requires less. Which one should you use depends how much of the
properties do you need to access in the code-behind. In general, I
like to stick with plain HTML or HTML controls because they require
less processing on the server, and makes the page load smaller because
they don't use the viewstate.

Regarding to PlaceHolder and Div, if you need to apply a style to a
block of HTML, then I'll use a Div.

Tommy,

br************@hotmail.com (bdwise) wrote in message news:<59**************************@posting.google. com>...
What is the difference between a Panel and a <div> tag with
runat="server"? It seems that I can add child controls to either one
in a code-behind and they both render to a <div> anyway at runtime.

What is the difference between a Placeholder and a Div, other than a
Placeholder does not render at runtime?

Thanks.

Nov 18 '05 #3

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

Similar topics

0
by: CoreyMas | last post by:
Hello everyone, I am in a bit of a dilema trying to write an HTML <br> tag into a panel or placeholder. Here is the situation I have 4 tables that represent 4 levels of data (level4 is...
1
by: Dunc | last post by:
I'm creating an XHTML page in aspx, and I've been using a Panel control to show and hide areas. I've just found, however, that depending on the browser you're using, sometimes it puts a DIV tag or...
2
by: Don Wash | last post by:
Hi There! I'm creating my website with ASP.NET + XHTML, which means I will strictly adhere the XHTML standards for my web page output. I use Panel or PlaceHolder WebControls to place...
1
by: Ralph Krausse | last post by:
What is the difference and why would you use or the other if you just need a place to hold other controls? Thanks Ralph Krausse www.consiliumsoft.com Use the START button? Then you need...
9
by: vvenk | last post by:
Hello: I was planning to use the panel to create a dockable container at the bottom of the screen that will display user preferences. I would like it to behave the following way: 1. It...
4
by: arun.hallan | last post by:
My code does the following... It references a stored procedure and builds a PlaceHolder containing certain controls, based on the parameters from the stored proc. This is implemented in it's own...
2
by: Nathan Sokalski | last post by:
I have an HTML table in which I am using ASP:Panel controls to group together <tr>'s so that I can more easily show/hide them (by setting the ASP:Panel's Visible property). This works fine, but...
1
by: Chris | last post by:
I want to group controls in a panel or placeholder, some of the controls are added dynamically. How do I control the order the controls appear prior to using css. And how do I ensure the panels css...
6
by: =?Utf-8?B?Sm9l?= | last post by:
Hello All: Does anyone know the difference between the Panel and Placeholder controls? What really are the differences? Why would I use one and not the other? TIA, -- Joe
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
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...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.