8.28.2012

Panel vs PlaceHolder

Difference between Panel and PlaceHolder

S.No Panel PlaceHolder
1
What tag rendered in output ?
Panel will render Div tags in the brower
What tag rendered in output ?
PlaceHolder will not render any tags
2
Does it provide Styling Attributes ?
Panel have the styling capabilites, so we can set the cssclass or style properties such as background-color, forecolor etc..
Does it provide Styling Attributes ?
Placeholder does not have any style attributes associated. We can not set cssclass or forecolor etc...
3
Automatic Width Adjustment: Panel cannot adjust width automatically if controls are added in it.
Automatic Width Adjustment: PlaceHolder can adjust width automatically if controls are added in it.
4
Memory Size: Panel is heavy in memory size as compare to PlaceHolder
Memory Size:PlaceHolder is light in memory size as compare to Panel.
5
When to use ? If we want to use it to separate controls visually, then we have to use Panel control.

When to use ? If we just want a container, without all the Display properties, then we have to use PlaceHolder control.

No comments:

Post a Comment