Help Assigning Label color from the table.

Discussion in 'ASP .Net Web Controls' started by JAPHET, Sep 30, 2004.

  1. JAPHET

    JAPHET Guest

    Plz Help me how to assign label color from the datareader

    I tried this it failled. Any Idea Please.

    Japhet.

    myLabel1.BackColor = "Color." & dr.Item("color_code")
     
    JAPHET, Sep 30, 2004
    #1
    1. Advertising

  2. JAPHET

    Alex Homer Guest

    Try this:

    myLabel1.BackColor = Color.FromName("the-color-name-here")

    Remember to import the System.Drawing namespace
     
    Alex Homer, Sep 30, 2004
    #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. mhnazly
    Replies:
    1
    Views:
    688
    Mike Moore [MSFT]
    Oct 28, 2003
  2. Rahul Chatterjee
    Replies:
    1
    Views:
    771
    Rahul Chatterjee
    Sep 25, 2008
  3. Kamaljeet Saini
    Replies:
    0
    Views:
    480
    Kamaljeet Saini
    Feb 13, 2009
  4. weston
    Replies:
    1
    Views:
    278
    Richard Cornford
    Sep 22, 2006
  5. Knut Krueger
    Replies:
    8
    Views:
    325
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page