jasonsmithoo1 — 2012-02-24T11:33:38-05:00 — #1
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.
wwb_99 — 2012-02-24T14:18:04-05:00 — #2
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.
daniel15 — 2012-02-26T06:25:00-05:00 — #3
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.
webber123456 — 2012-02-26T16:40:49-05:00 — #4
This thread should be moved to the DotNet forum
mittineague — 2014-09-17T23:36:09-04:00 — #5
This topic is now archived. It is frozen and cannot be changed in any way.