Ask the DotNetJunkies: Working with Properties and Data Types
Details Related Types
Site:  DotNetJunkies
Original URL:  http://www.dotnetjunkies.com/Tutorial/404068A9-58ED-46E2-9705-E57E5C0F039E.dcik
Summary:
How do I change forecolor of Label programmatically? I have tried... lblTest.forecolor="green" but keeping getting "System.String cannot be converted to System.Drawing.Color" error. Any help would be appreciated. This is a good question because it gives me the opportunity to address some of the fundamentals of how the .NET Framework handles data types. In classic ASP a color name and a string didn't seem any different in that they were both string values. In .NET data types are much more important and much
System.Drawing.Color
System.EventArgs
System.String
System.Web.UI.WebControls.DropDownList
System.Web.UI.WebControls.ListItem
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com