Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Ch21 of VS.Net, Exposing Field with WUC


Message #1 by "Tatsuo NIshimura" <timnish@b...> on Thu, 9 May 2002 14:27:41
The following line on Page 719 of VS.Net to set the bg color property 
results in Parser error.
'<ch21:navbar id="MyNavBar" runat="server' backcolor="Chartreuse"'
Parser error:
'Cannot create an object of type "System.Drawing.Color" from its string 
representation "* tried with other valid colors such as #00cc00" for 
the "BackColor" property'
What is wrong with this and how can I solve this problem?

The codes in ASCX is as it is given in the book and it works without bg 
color setting from the hosing page.  I am using Visual.net release 
version (not Beta2) but, still I have to use Sub Page_Load rather than 
Sub Control_Load to activate this sub routine.

Thank you for your help. 
Message #2 by Ron0079@a... on Thu, 9 May 2002 09:42:19 EDT
--part1_19c.1fd1f56.2a0bd6bb_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

In a message dated 5/9/2002 9:22:34 AM Eastern Daylight Time, 
timnish@b... writes:


> '<ch21:navbar id="MyNavBar" runat="server' backcolor="Chartreuse"'
> Parser error:
> 'Cannot create an object of type "System.Drawing.Color" from its string 
> representation "*

Try:

backcolor = Color.Chartreuse

Ron

Message #3 by "Tim Nishimura" <timnish@b...> on Thu, 9 May 2002 17:16:12 -0400
This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C1F77D.3E6C6B70
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Thanks for the suggestion.  Unfortunately, it did not work.  The same
error shows up.  Tim

 

-----Original Message-----
From: Ron0079@a... [mailto:Ron0079@a...] 
Sent: Thursday, May 09, 2002 9:42 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: Ch21 of VS.Net, Exposing Field with WUC

 

In a message dated 5/9/2002 9:22:34 AM Eastern Daylight Time,
timnish@b... writes:





'<ch21:navbar id="MyNavBar" runat="server' backcolor="Chartreuse"'
Parser error:
'Cannot create an object of type "System.Drawing.Color" from its string 
representation "*



Try:

backcolor = Color.Chartreuse

Ron --- 





  Return to Index