Re: LinkButtons and MouseOver

Discussion in 'ASP .Net' started by Vidar Petursson, Jul 8, 2003.

  1. Hi

    myBtn.Attributes.Add("onmouseover","window.status=''; return true");

    Change font color with CSS
    <style type="text/CSS">
    a {color:violet}
    a:hover{color:green}
    </style>

    Or in script change status & color
    myBtn.Attributes.Add("onmouseover","window.status='';
    this.style.color='#00ff00'; return true");
    myBtn.Attributes.Add("onmouseout","window.status='';
    this.style.color='#ff0000'; return true");

    Or using CSS class
    <style type="text/CSS">
    ..myA{color:violet}
    ..myA:hover{color:green}
    </style>

    myBtn.Attributes.Add("class","myA");

    More info
    http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "sramruttun" <> wrote in message
    news:...
    > I have an ascx page which acts as a menu. The menu has a table with a no

    of
    > linkbuttons. When the app is running, if I put my mouse over any

    linkbutton,
    > I get something like this in the status bar:
    > javascript: __doPostBack('Menu1$LBClient',")
    > Of course, LBClient is the name of i linkbutton.
    >
    > Questions:
    > 1) Is there a way to remove this, and instead have something like
    > 'client.aspx' or nothing at all?
    > 2) How do I implement a MouseOver event so that the linkbutton changes

    color
    > when I move my mouse around the linkbuttons? - I tried it, I was not able

    to
    > change the color of the linkbutton but the background color.
    >
    >
    Vidar Petursson, Jul 8, 2003
    #1
    1. Advertising

  2. Vidar Petursson

    sramruttun Guest

    thanks vidar - your solutions worked out -just a small question.
    what is the 'a' in the 'a:hover' - is it a class name or what?

    "Vidar Petursson" <> wrote in message
    news:...
    > Hi
    >
    > myBtn.Attributes.Add("onmouseover","window.status=''; return true");
    >
    > Change font color with CSS
    > <style type="text/CSS">
    > a {color:violet}
    > a:hover{color:green}
    > </style>
    >
    > Or in script change status & color
    > myBtn.Attributes.Add("onmouseover","window.status='';
    > this.style.color='#00ff00'; return true");
    > myBtn.Attributes.Add("onmouseout","window.status='';
    > this.style.color='#ff0000'; return true");
    >
    > Or using CSS class
    > <style type="text/CSS">
    > .myA{color:violet}
    > .myA:hover{color:green}
    > </style>
    >
    > myBtn.Attributes.Add("class","myA");
    >
    > More info
    >

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref
    erence/dhtml_reference_entry.asp
    >
    > --
    > Best Regards
    > Vidar Petursson
    > ==============================
    > Microsoft Internet Client & Controls MVP
    > ==============================
    > "sramruttun" <> wrote in message
    > news:...
    > > I have an ascx page which acts as a menu. The menu has a table with a no

    > of
    > > linkbuttons. When the app is running, if I put my mouse over any

    > linkbutton,
    > > I get something like this in the status bar:
    > > javascript: __doPostBack('Menu1$LBClient',")
    > > Of course, LBClient is the name of i linkbutton.
    > >
    > > Questions:
    > > 1) Is there a way to remove this, and instead have something like
    > > 'client.aspx' or nothing at all?
    > > 2) How do I implement a MouseOver event so that the linkbutton changes

    > color
    > > when I move my mouse around the linkbuttons? - I tried it, I was not

    able
    > to
    > > change the color of the linkbutton but the background color.
    > >
    > >

    >
    >
    sramruttun, Jul 9, 2003
    #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. Lucas Tam

    LoadPostData and LinkButtons

    Lucas Tam, Aug 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    313
    Lucas Tam
    Aug 18, 2003
  2. JJ
    Replies:
    1
    Views:
    466
    =?Utf-8?B?RG90TmV0SmVyb21l?=
    Feb 26, 2005
  3. Replies:
    1
    Views:
    394
    David Wier
    Sep 19, 2006
  4. sramruttun

    LinkButtons and MouseOver

    sramruttun, Jul 8, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    275
    sramruttun
    Jul 14, 2003
  5. sramruttun

    LinkButtons and MouseOver

    sramruttun, Jul 8, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    119
    sramruttun
    Jul 9, 2003
Loading...

Share This Page