473,698 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9902
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.go ogle.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
2466
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 linked to a level3 etc) all the way up to a level 1
1
1422
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 a TABLE tag into the code, which I really don't want. To work around it, I've been using the Placeholder instead of the Panel - works perfectly, but it makes any ASPX tags within the placeholder come up as invalid. Does anyone have a better...
2
3617
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 dynamically created <div></div> contents to my web pages. But the problem arises when because Panel and PlaceHolder WebControls do extra work with <span> tags as follows...
1
6187
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 CSFastRunII...
9
2265
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 should not have any caption. (I am unable to turn off the caption that displays the name of the object).
4
2008
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 class. On the form, the user can select from a drop down box of many stored procs. From that, parameter fields are created which the user can change, in the PlaceHolder, and then added to the Panel on the form.
2
2477
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 Visual Studio .NET 2005's Design View always hides the <tr>'s regardless of whether the ASP:Panel's Visible property is set to True, False, or not set at all. Is there some way I can stop Visual Studio .NET 2005's Design View from hiding my <tr>'s...
1
2270
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 groups all the control within the class. When I add controls to the placeholder below dynamically the css which has a border for panel1 does not go around all of the controls it kind of goes in a band above the controls rather than surround them....
6
16109
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
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.