Label formatting

  • Thread starter Thread starter Mervin Williams
  • Start date Start date
M

Mervin Williams

Can the text property be set inside the html using the String.Format()
method? If not, is there some other means of setting the format for a label
statically (not in code)?

Thanks in advance,

Mervin Williams
 
Mervin,

Sounds like your talking about Style, not Format. Formatting (as in
String.Format) is used to manipulate strings based on a format string. If
you are infact talking about Formating, then you will always need to use
String.Format against your label text, since String.Format will take more
arguments than just a base string.

-- Alex Papadimoulis
 
I would like to set the label text property to the value of a textbox
control's text value, within the html itself, not programmatically.

Mervin Williams
 
<asp:Label runat="server" id="Label1" Text="This is the label
Text"></asp:Label>

or

<asp:Label runat="server" id="Label1">This is the label Text</asp:Label>
 
Back
Top