why does asp:panel not have a Text attribute?

  • Thread starter Thread starter sklett
  • Start date Start date
S

sklett

I'm curious... asp:Panel renderes a <div> tag, right? And you can have text
in a div tag.... so why not have a Text property for the asp:panel control??
 
I'm sure this is an ignorant question.... what would one use a container
for, the most common use you can think of?
 
To group other objects together. So if I need to show one group of objects
in one case, and another set in a different case, i can put each set of
objects in their own panel. Then I can make the panel i need to show
visible, and make the other one invisible. So instead of keeping a list of
objects I need to make invisible, and going through each one, I could just
do it all in one line. If I end up adding or deleting objects from either
set, this code would not have to change as I am only changing the Visible
property of the panel.
 
You can put ANYHTING in a <div> tag - that's why.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Cool. Without even realizing it that's what I've done with my
"ProductWizard.aspx" page, hide em all, then show the current step. I see
the value in a panel as a container, but I still don't see why I can't drop
some text in there.

Thanks for the quick response!
 
Back
Top