how do you set the font size in a table cell?

I'm trying to set a table cell to a font size of smaller, or small, etc.

I know for setting the font style or name I would go

Dim tCell as table cell

tCell.Font.name = "arial"

how can I do the same for size???
shuittnyAsked:
Who is Participating?
 
tusharashahCommented:
In that case use this:

tCell.Font.Size = FontUnit.Point(8)

0
 
tusharashahCommented:
tCell.Font.Size = 123

0
 
shuittnyAuthor Commented:
i get a 'Integer can't be converted to 'System.Web.UI.WebControls.FontUnit' error message.

0
 
shuittnyAuthor Commented:
right on!

A-W-E-S-O-M-E!
0
 
stevewolfCommented:
Very useful.  The Wrox book Professional ASP.NET shows an example (in VB.NET) as:

tCell.Style("font-family") = "Tahoma"
tCell.Style("font-weight")="30px"

which did not work.

tCell.font.whatever is exactly what I needed.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.