Label formatting

  • Thread starter Mervin Williams
  • 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
 
A

Alex Papadimoulis

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
 
M

Mervin Williams

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
 
D

David Jessee

<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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top