S
shapper
Hello,
What control should I use when displaying some text? A Literal or a
Label?
Considerer I want to display some text and apply a CSS class to it.
I can do it in 2 ways:
MyLabel.CssClass = "MyClass"
MyLabel.Text = "My Text"
Or using a Literal
MyLiteral.Text = "<p class=""MyClass"">My Text</p>"
Which approach should I use?
I know Asp:Label is good for placing before a TextBox.
However in the situation I explained in this message I don't know which
one should I use.
Could someone, please, help me out with this?
Thanks,
Miguel
What control should I use when displaying some text? A Literal or a
Label?
Considerer I want to display some text and apply a CSS class to it.
I can do it in 2 ways:
MyLabel.CssClass = "MyClass"
MyLabel.Text = "My Text"
Or using a Literal
MyLiteral.Text = "<p class=""MyClass"">My Text</p>"
Which approach should I use?
I know Asp:Label is good for placing before a TextBox.
However in the situation I explained in this message I don't know which
one should I use.
Could someone, please, help me out with this?
Thanks,
Miguel