why the error ?

J

Jon Paal

why the error ?

Compiler Error Message: BC30452: Operator '&' is not defined for types 'System.Web.UI.WebControls.FontUnit' and 'String'.

Source Error:


Line 203: writer.AddAttribute("border", "1")
Line 204: writer.AddAttribute("style", ("FONT-SIZE: " _
Line 205: & (Font.Size & (";FONT-FAMILY: " _
Line 206: & (Font.Name & ";BORDER-COLLAPSE: collapse")))))
Line 207: writer.AddAttribute("borderColor", "#000000")

Source File: C:\..\test.vb Line: 205
 
M

Matt Dinovo

You need to add a .ToString() to the Font.Size statement. Example:

& (Font.Size.ToString() & (";FONT-FAMILY: " _

Also, based on what you're doing, you probably want to use the
Font.SizeInPoints property.

HTH,

Matt Dinovo
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top