|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Set Label Font?Hello,
I want to set a label text from my vb code. Something like: MyLabel Text Font = "verdana, arial,..." MyLabel Text Size = "12px" MyLabel Text Bold = True How can I do this? Thanks, Miguel "ASP.NET Server Controls and CSS Styles"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconwebformscontrolscssstyles.asp Show quoteHide quote "Shapper" wrote: > Hello, > > I want to set a label text from my vb code. Something like: > > MyLabel Text Font = "verdana, arial,..." > MyLabel Text Size = "12px" > MyLabel Text Bold = True > > How can I do this? > > Thanks, > Miguel > > lblName.Attributes.Add("Style","font-face: Arial;font-size:
10pt;font-weight:bold;") Show quoteHide quote "Shapper" wrote: > Hello, > > I want to set a label text from my vb code. Something like: > > MyLabel Text Font = "verdana, arial,..." > MyLabel Text Size = "12px" > MyLabel Text Bold = True > > How can I do this? > > Thanks, > Miguel > > MyLabel.Font.Names = "Verdana, Arial"
MyLabel.Font.Size = 10 MyLabel.Font.Bold = True "Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message I want to set a label text from my vb code. Something like:news:O8C96YczFHA.3408@TK2MSFTNGP09.phx.gbl... Hello, MyLabel Text Font = "verdana, arial,..." MyLabel Text Size = "12px" MyLabel Text Bold = True How can I do this? Thanks, Miguel MyLabel.CssClass="myLabelStyle"
and define the font properties in myLabelStyle css rule. Eliyahu Show quoteHide quote "Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message news:O8C96YczFHA.3408@TK2MSFTNGP09.phx.gbl... > Hello, > > I want to set a label text from my vb code. Something like: > > MyLabel Text Font = "verdana, arial,..." > MyLabel Text Size = "12px" > MyLabel Text Bold = True > > How can I do this? > > Thanks, > Miguel >
Other interesting topics
Master Pages, seems like it causes more problems than it fixes?
javascript call ViewState got confused between two user controls in same parent ct XML SqlDataSource - strange error (to me at least) ;-) NullReferenceException for System.Data.SQLClient is there an error here ? getvalue from user control Menues with v1.1? Which account neets permission to read the Registry key. |
|||||||||||||||||||||||