rollover buttons

Discussion in 'ASP .Net' started by dave, May 12, 2005.

  1. dave

    dave Guest

    Hi
    I'm newbie to asp.net though I have good classic asp experience.
    Can any one suggest whats the best asp.net way to create rollover button..
    I checked below link
    http://www.realworldasp.net/article.asp?article=146
    but when page first time loads, it takes bit more time to see roll over image when you put mouse first time on image.
    Is it possible easier way to keep button on when user click and goes off when he clicks on another button..
    Any help would be appreciated...
    Thanx
    dave
    dave, May 12, 2005
    #1
    1. Advertising

  2. dave

    Guest

    If this button is an image you can add the attribute runat=server this
    will allow you to access this image in the code behind via the

    System.Web.UI.HtmlControls
    Then in you code behind create a protected variable like so

    protected System.Web.UI.HtmlControls.HtmlImage imageName;

    Then in the Page_load method you can do this.

    imageName.Attributes.add("onMouseOver", "doRollover()")

    What this does is render a image tag when the page loads that will look
    like this

    <img src="asdfsaf.gif" onMouseOver="foRollover()">

    now the java script can be written as normal.

    Hope that helps,
    Brette
    , May 12, 2005
    #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. Leythos
    Replies:
    4
    Views:
    3,585
    Leythos
    Mar 30, 2005
  2. Doug
    Replies:
    2
    Views:
    402
  3. Gepi Solo

    PyGTK - Rollover Buttons

    Gepi Solo, Sep 7, 2006, in forum: Python
    Replies:
    0
    Views:
    392
    Gepi Solo
    Sep 7, 2006
  4. Keith G Hicks

    trouble with rollover buttons on master page

    Keith G Hicks, Mar 27, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    530
    Keith G Hicks
    Mar 28, 2008
  5. JR

    Value of Rollover Submit Buttons

    JR, Mar 4, 2004, in forum: Javascript
    Replies:
    0
    Views:
    98
Loading...

Share This Page