Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Setting the backcolor

 
Thread Tools Search this Thread
Old 07-26-2004, 06:15 PM   #1
Default Setting the backcolor


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




WilsonSmith
  Reply With Quote
Old 07-26-2004, 06:36 PM   #2
David Wier
 
Posts: n/a
Default Re: Setting the backcolor
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


"WilsonSmith" <> wrote in message
news:...
> 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
>
>





David Wier
  Reply With Quote
Old 07-26-2004, 06:57 PM   #3
WilsonSmith
 
Posts: n/a
Default Re: Setting the backcolor
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


"David Wier" <> wrote in message
news:...
> 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
>
>
> "WilsonSmith" <> wrote in message
> news:...
> > 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
> >
> >

>
>





WilsonSmith
  Reply With Quote
Old 07-26-2004, 07:26 PM   #4
David Wier
 
Posts: n/a
Default Re: Setting the backcolor
Make it:
rbtMyButton.BackColor = Color.FromARGB(&H7868228b)

(also - don't forget to import System.Drawing)

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


"WilsonSmith" <> wrote in message
news:%...
> 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
>
>
> "David Wier" <> wrote in message
> news:...
> > 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
> >
> >
> > "WilsonSmith" <> wrote in message
> > news:...
> > > 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
> > >
> > >

> >
> >

>
>





David Wier
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up etherchannel!! vishamr2000 Hardware 0 07-17-2007 01:53 PM
Setting up a home theatre PC Admin@MovieManager.ca DVD Video 3 06-10-2007 05:05 PM
DVD shrink Compression setting question Emerald Green DVD Video 5 10-02-2005 10:39 PM
When setting a TV as a Second display device will i get componet as a connection option ??? Kate Jackson DVD Video 5 06-22-2005 01:33 PM
Need Help Setting Up Domain Server maxz1 A+ Certification 0 11-26-2003 08:33 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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