LinkButtons and MouseOver

Discussion in 'ASP .Net Building Controls' started by sramruttun, Jul 8, 2003.

  1. sramruttun

    sramruttun Guest

    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 8, 2003
    #1
    1. Advertisements

  2. Hi sramruttun,

    1) You need to use javascript for this. Take a look at window.status
    2) There is a onmouseover event, but for changing color when mouse is over a
    link you could avoid using this event for the simpler solution of using CSS,
    something like:
    <style>
    .yourstyle {color:red}
    .yourstyle:hover {color:blue}
    </style>
    <a href="A" class="yourstyle">blah</a>

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx
    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
    and not by private mail.
     
    Victor Garcia Aprea [MVP], Jul 12, 2003
    #2
    1. Advertisements

  3. sramruttun

    sramruttun Guest

    thanks victor
    1)the CSS method works
    2)I came to know about the window.status and it worked too
     
    sramruttun, Jul 14, 2003
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.