all groups > asp.net building controls > january 2006 >
You're in the

asp.net building controls

group:

why the error ?


why the error ? Jon Paal
1/31/2006 9:25:54 PM
asp.net building controls:
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


Re: why the error ? Matt Dinovo
2/1/2006 7:40:05 AM
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

[quoted text, click to view]

AddThis Social Bookmark Button