By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,633 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,633 IT Pros & Developers. It's quick & easy.

compilationn error for html text writer

P: n/a
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
Jan 31 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
----
700cb Development, Inc.
http://www.700cb.net
..NET utilities, developer tools,
and enterprise solutions

"Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in
news:uF**************@TK2MSFTNGP14.phx.gbl:
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


Mar 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.