Re: Colors

Discussion in 'ASP .Net' started by Zanna, Aug 27, 2005.

  1. Zanna

    Zanna Guest

    "Paul Smith" <> ha scritto nel messaggio
    news:43066b16$0$97123$ed2619ec@ptn-nntp-

    > I have a button on my web page the backcolor of which I want to change:
    >
    > btnSample.backcolor = ????????
    >
    > I want the color to be Gainsboro
    >
    > However I enter Gainsboro or color.Gainsboro I have the blue wavy line
    > indicating an error.


    What is the error?

    in C# (case sensitive) you need to write

    btnSample.BackColor = Color.Gainsboro;

    It's really no matther if the value came from the Web palette or it is in
    RGB: it's a System.Drawing.Color and this is all you need.

    --
    ..Net Reporting tool: http://www.neodatatype.net
     
    Zanna, Aug 27, 2005
    #1
    1. Advertising

  2. Zanna

    Scott M. Guest

    The problem is that Gainsboro doesn't get converted to an RGB when the code
    is delivered to the client. Cascading Style Sheet code is produced with the
    color name Gainsboro still intact. The use of the color name in the client
    code is producing different colors depending on the client that is receiving
    the code. There is no error message.

    If you've read this thread, you'll see that the solution is not to use the
    color name Gainsboro and to use the RGB value for it instead.

    "Zanna" <> wrote in message
    news:HDXPe.108672$...
    > "Paul Smith" <> ha scritto nel messaggio
    > news:43066b16$0$97123$ed2619ec@ptn-nntp-
    >
    >> I have a button on my web page the backcolor of which I want to change:
    >>
    >> btnSample.backcolor = ????????
    >>
    >> I want the color to be Gainsboro
    >>
    >> However I enter Gainsboro or color.Gainsboro I have the blue wavy line
    >> indicating an error.

    >
    > What is the error?
    >
    > in C# (case sensitive) you need to write
    >
    > btnSample.BackColor = Color.Gainsboro;
    >
    > It's really no matther if the value came from the Web palette or it is in
    > RGB: it's a System.Drawing.Color and this is all you need.
    >
    > --
    > .Net Reporting tool: http://www.neodatatype.net
    >
    >
     
    Scott M., Aug 27, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Smith

    Colors

    Paul Smith, Aug 20, 2005, in forum: ASP .Net
    Replies:
    11
    Views:
    1,281
    Scott M.
    Aug 29, 2005
  2. Jerry Camel

    Conditional Colors in a DataList Control

    Jerry Camel, Feb 12, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    313
    =?Utf-8?B?U3VyZXNo?=
    Feb 12, 2004
  3. Mark

    display all colors

    Mark, Apr 15, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    513
    Ken Cox [Microsoft MVP]
    Apr 15, 2004
  4. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    540
    darrel
    Aug 7, 2008
  5. ZelluX
    Replies:
    3
    Views:
    1,890
    Peter Otten
    Dec 1, 2008
Loading...

Share This Page