Change Control Color While Mouse Enters

Discussion in 'ASP .Net' started by Angel, Jan 1, 2004.

  1. Angel

    Angel Guest

    How do you change the color of a control when the mouse
    enters the area of the control? And then change it back to
    the original color when the mouse exits the control?

    The Server controls do not have a Mouse Event that I can
    code this....

    Thanks...
    Angel, Jan 1, 2004
    #1
    1. Advertising

  2. Angel

    Alvin Bruney Guest

    in your page load event do this assuming your control is named add


    Add.Attributes.Add("onmouseover","document.all['Add'].style.color='red';");

    Add.Attributes.Add("onmouseout","document.all['Add'].style.color='ivory';");


    --
    Regards,
    Alvin Bruney
    Got tidbits? Get it here...
    http://tinyurl.com/2bz4t
    "Angel" <> wrote in message
    news:002c01c3d098$1a47def0$...
    > How do you change the color of a control when the mouse
    > enters the area of the control? And then change it back to
    > the original color when the mouse exits the control?
    >
    > The Server controls do not have a Mouse Event that I can
    > code this....
    >
    > Thanks...
    Alvin Bruney, Jan 1, 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. karunakar
    Replies:
    1
    Views:
    9,692
    Eliyahu Goldin
    Jan 31, 2005
  2. Claus Atzenbeck
    Replies:
    1
    Views:
    1,082
    Claus Atzenbeck
    Nov 26, 2004
  3. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    394
    Jaime Stuardo
    Apr 7, 2006
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    410
    Kamaljeet Saini
    Feb 13, 2009
  5. Stefan Mueller
    Replies:
    0
    Views:
    371
    Stefan Mueller
    Jan 28, 2006
Loading...

Share This Page