rollover buttons

D

dave

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
 
P

pitdog

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top