Setting the backcolor

W

WilsonSmith

I want to set the back color of radio button to some numeric value.
How to do that(Syntax)?

Something like this.
rbtMyButton.BackColor = #63338b
I am using .Net Framework 1.1.

Thanks.

W Smith
 
D

David Wier

First, Import System.Drawing

All the methods of System.Drawing.Color, at first, seem to bypass the use of
Hex codes, like normally used in HTML. However, there is a method using one
argument that you can use:
Color.FromARGB

If you use only one Int32 as an argument, you can preface your Hex code with
'&H78' and it will work perfectly - - like this:

myVar=Color.FromARGB(&H78CEEFFF)

David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
 
W

WilsonSmith

David,
Here is my color for table

TABLE borderColor="#68228b"

Could not achieve the same color by implementing the below code.
rbtMyButton.BackColor = Color.FromARGB(&H68228b)

How to do that?

W Smith
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top