Hello dear folks,
I just realized that the asp server controls like <asp Label> control gets rendered out as a <span> tag.
I know <asp Label> is a server control and not a HTML control. Does all server controls get rendered onto HTML <span> tag?
can someone point me to any links/knowlegebase about this concept...totally surprised.
The reason labels get rendered inside tags is they needed some way to support the visual properties. They can actually also render as html labels if you use the right property who's name I am not recalling. In any case, that is probably the only time one should be using label controls. Unfortunately most of the tutorials just go there and forget about the much more useful literal control which just puts your text on the page sans any wrapping element.
They can actually also render as html labels if you use the right property who's name I am not recalling.
You should use an <asp:Literal> if you don't want any wrapping element.
This thread should be moved to the DotNet forum
This topic is now archived. It is frozen and cannot be changed in any way.