compilationn error for html text writer

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
 
C

cbDevelopment

Font.Size is an object. It can be Percent, Pixels, points, etc. You want
to use: Font.Size.Unit.Value or maybe .ToString. In any case, you must
work through the Unit object.

--
 

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

Similar Threads


Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,161
Latest member
GertrudeMa
Top