Home All Groups Group Topic Archive Search About
Author
10 Oct 2005 6:12 PM
Shapper
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

Author
10 Oct 2005 6:28 PM
Sreejith Ram
"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
>
>
Are all your drivers up to date? click for free checkup

Author
10 Oct 2005 6:29 PM
Curt_C [MVP]
lblName.Attributes.Add("Style","font-face: Arial;font-size:
10pt;font-weight:bold;")

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com



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
>
>
Author
10 Oct 2005 6:30 PM
Siva M
MyLabel.Font.Names = "Verdana, Arial"
MyLabel.Font.Size = 10
MyLabel.Font.Bold = True

"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
Author
10 Oct 2005 7:22 PM
Eliyahu Goldin
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
>

Bookmark and Share