Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > rollover buttons

Thread Tools

rollover buttons

Posts: n/a
I'm newbie to though I have good classic asp experience.
Can any one suggest whats the best way to create rollover button..
I checked below link
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...

Reply With Quote
Posts: n/a
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

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,

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble with rollover buttons on master page Keith G Hicks ASP .Net 4 03-28-2008 12:49 AM
PyGTK - Rollover Buttons Gepi Solo Python 0 09-07-2006 03:00 PM
Possible to have non-image based rollover buttons? Doug ASP .Net 2 07-12-2006 05:17 PM
java-script for DreamWeaver MX RollOver buttons and FireFox Leythos HTML 4 03-30-2005 08:54 PM
Value of Rollover Submit Buttons JR Javascript 0 03-04-2004 06:54 PM