Saturday, March 26, 2011

Literal

I found out something today the Literal control that we use so much with dynamic displays (at least I do) does not support cssClass.
I had a literal control and all I did was added class="msg" ...

<asp:Literal ID="litContactMsg" runat="server"></asp:Literal>

I tried this

<asp:Literal ID="litContactMsg" runat="server" class="msg"></asp:Literal>

and I got the error creating control message
and then i read http://msdn.microsoft.com/en-us/library/system.web.ui.literalcontrol.aspx
and it was some straight thinking that got me to the fact that its a container since it has the childcontrol property
well so what if it is....I mean hey ... there are others with children.... and then W3C showed up
see this..

http://www.w3schools.com/ASPNET/control_literal.asp




my God! its simple things that bowl you over.

No comments:

Post a Comment