November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
I belive it would be helpful if you could try to explain "why" you would like to use extra tags at all.
Is it to be able to switch content "on and off" ? I.e. use Visible = <%# something() %> or similar?
Or is it just to output plain text to the webbpage?
The ASP.NET Label control will render as a <label> element if you set the AssociatedControlID property.
If you want to render plain text, use the Literal control instead.
If you want to display/hide specific parts of a page, use the PlaceHolder control since it won't render any HTML whatsoever, except for the markup within the PlaceHolder tags.
Thanx guys, your answers were helpful!
@Aanund:
I do not understand your question. As I stated in my first post asp:label renders as an inline container e.g. <span><p>Content</p></span>. Since you cannon validate block elements (<p>, <ul> etc.) inside a span, I wanted to have a <div> instead so it renders <div><p>Content</p></div>.
Chears!
(I hope not posting this to the wrong forum. Maby it is a .net related question rather than an EPiServer question.)
Since I'm not really a .net developer but more of a designer with focus om W3C standards, I'm not sure whats giong on here. I've got my text output through a label control such as:
<asp:Label runat="server" ID="TextContent1"></asp:Label>
This will render:
<span id="ctl00_MySiteContent_TextContent1"></span>
'span' is an inline tag that does not allow block elements such as 'h1', 'h2', 'p' and so on inside it to validate with W3C (those block elements comes from the text editor, the content).
Is the only solution to do a <div runat="server"> to make the content holder a block element or is it possible to make the asp:label to render a 'div' instead of a 'span' (doing span{display:block; is not an option})?