By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,916 Members | 1,728 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,916 IT Pros & Developers. It's quick & easy.

.NET Panel vs. Placeholder controls

P: n/a
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
May 8 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi,
I'm not an expert, but I think the panel generates a div or a span depending
on the browser it encounters... the placeholder is mostly (if not
exclusively) used in masterpages so it indicates to inheriting pages that
there should be something in this place...

See there for more details
http://msdn2.microsoft.com/en-us/library/wtxbf3hh.aspx

I hope it helps

ThunderMusic

"Joe" <Jo*@discussions.microsoft.comwrote in message
news:97**********************************@microsof t.com...
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

May 8 '07 #2

P: n/a
Joe,

The Panel is essentially an html <divelement, it is a container where
other controls can be placed.

The Placeholder is not a container in the same sense. It doesn't produce any
html output. It just reserves place for the controls you put in it and gets
replaced by them.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Joe" <Jo*@discussions.microsoft.comwrote in message
news:97**********************************@microsof t.com...
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

May 8 '07 #3

P: n/a
Hi,

Thanks for your reply. I just trired each in a web form and found that the
OPanel does render as a <div(at elast in my browser IE 6). Does a
placeholder render as anything? It doesn't appear to be that way.

Thanks,
--
Joe
"ThunderMusic" wrote:
Hi,
I'm not an expert, but I think the panel generates a div or a span depending
on the browser it encounters... the placeholder is mostly (if not
exclusively) used in masterpages so it indicates to inheriting pages that
there should be something in this place...

See there for more details
http://msdn2.microsoft.com/en-us/library/wtxbf3hh.aspx

I hope it helps

ThunderMusic

"Joe" <Jo*@discussions.microsoft.comwrote in message
news:97**********************************@microsof t.com...
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


May 8 '07 #4

P: n/a
Hi Joe,

Panel is more advanced control and renders as <divtag (therefore can have
background colour, background image, tooltip etc.) whilst place holder does
not render any html mark-up itself (inner controls only). As name indicates,
Placeholder is usually used as container for dynamically created controls
that have to be instantiated within a parent control, or to show / hide child
controls.

Regards
--
Milosz
"Joe" wrote:
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
May 8 '07 #5

P: n/a
Thanks to everyone.
--
Joe
"Milosz Skalecki [MCAD]" wrote:
Hi Joe,

Panel is more advanced control and renders as <divtag (therefore can have
background colour, background image, tooltip etc.) whilst place holder does
not render any html mark-up itself (inner controls only). As name indicates,
Placeholder is usually used as container for dynamically created controls
that have to be instantiated within a parent control, or to show / hide child
controls.

Regards
--
Milosz
"Joe" wrote:
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
May 8 '07 #6

P: n/a
Panel does NOT always show as a DIV. It depends on your browser and your
browsercaps.

I had problems with worldpay. I was blaming them for changing my 'divs' to
tables. I really didn't understand at the time what was happening when I was
doing exactly what they did with the page (screen scraping).

It turns out that they use a java scraper. The browsercaps had never heard
of the browser type, so .NET was rendering it as a table, which was totally
screwing up the formatting.

If people don't have the latest browsers or are using some sort of home
built screenscraping (not using the MSXMLHTTP stuff), then .NET renders to
the lower common denominator, which is tables.

So, if you want to ensure divs, then render your own as an HTML control.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:4A**********************************@microsof t.com...
Hi Joe,

Panel is more advanced control and renders as <divtag (therefore can
have
background colour, background image, tooltip etc.) whilst place holder
does
not render any html mark-up itself (inner controls only). As name
indicates,
Placeholder is usually used as container for dynamically created controls
that have to be instantiated within a parent control, or to show / hide
child
controls.

Regards
--
Milosz
"Joe" wrote:
>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

May 8 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.