Jul
27
by Mike Fleming at 8:15 am No Comments .NET | label control, span
Have you ever had the need to use a label control, but you don’t need the span tag that the control automatically wraps around the text? Switch your control over to the Literal control instead. It serves the same general purpose as the label control, but will not wrap your output in those pesky span tags.
You can then use your normal server side code to the change the value, just as you would the label control:
myControl.Text = "My new random value"