adding attributes

Discussion in 'ASP .Net' started by Mark, Dec 31, 2003.

  1. Mark

    Mark Guest

    Hello all.

    Why doesnt this work
    e.Cell.Attributes.Add("onmouseover", "this.style.foreColor='Red'")

    but this does

    e.Cell.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")

    Please Help

    Mark
     
    Mark, Dec 31, 2003
    #1
    1. Advertising

  2. Mark

    Curt_C [MVP] Guest

    these are case sensitive....make sure that
    "backgroundColor" is a valid call...isnt it "bgColor" ? or
    "background-color" or something like that?


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Mark" <> wrote in message
    news:...
    > Hello all.
    >
    > Why doesnt this work
    > e.Cell.Attributes.Add("onmouseover", "this.style.foreColor='Red'")
    >
    > but this does
    >
    > e.Cell.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")
    >
    > Please Help
    >
    > Mark
    >
    >
    >
    >
     
    Curt_C [MVP], Dec 31, 2003
    #2
    1. Advertising

  3. Mark

    Curt_C [MVP] Guest

    Whoops... reverse that....
    it's "color" not "foreColor"

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Mark" <> wrote in message
    news:...
    > Hello all.
    >
    > Why doesnt this work
    > e.Cell.Attributes.Add("onmouseover", "this.style.foreColor='Red'")
    >
    > but this does
    >
    > e.Cell.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")
    >
    > Please Help
    >
    > Mark
    >
    >
    >
    >
     
    Curt_C [MVP], Dec 31, 2003
    #3
    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. Max
    Replies:
    1
    Views:
    484
    Joe Kesselman
    Sep 22, 2006
  2. P4trykx
    Replies:
    2
    Views:
    1,826
    bruce barker
    Jan 31, 2007
  3. james_027

    class attributes & data attributes

    james_027, Jun 20, 2007, in forum: Python
    Replies:
    2
    Views:
    377
    Bruno Desthuilliers
    Jun 20, 2007
  4. Kyle Schmitt
    Replies:
    3
    Views:
    194
    Kyle Schmitt
    Jul 24, 2007
  5. Jayden
    Replies:
    16
    Views:
    529
    Steven D'Aprano
    Sep 29, 2012
Loading...

Share This Page