Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

rollover buttons

 
 
dave
Guest
Posts: n/a
 
      05-11-2005
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

 
Reply With Quote
 
 
 
 
pitdog@gmail.com
Guest
Posts: n/a
 
      05-12-2005
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

 
Reply With Quote
 
 
 
Reply

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



Advertisments