Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > why the error ?

Reply
Thread Tools

why the error ?

 
 
Jon Paal
Guest
Posts: n/a
 
      02-01-2006
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



 
Reply With Quote
 
 
 
 
Matt Dinovo
Guest
Posts: n/a
 
      02-01-2006
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

"Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
news:%23VYR6$...
> 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
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM
Why, why, why??? =?Utf-8?B?VGltOjouLg==?= ASP .Net 6 01-27-2005 03:35 PM
Why Why Why You HAVE NO IDEA MCSE 31 04-24-2004 06:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57