Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two images: over.png and out.png.I want to over.png is displayed when mouse over buttons.And out.png is displayed when the mouse out button.When clicking,out.png will display.Can I use skin?How?
Posted
Comments
bhagirathimfs 18-May-12 2:09am    
If you want to do the above thing for all the buttons of your website than better to use skin.
Otherwise simply use mousehover and mouseLeave event and the ImageUrl property of the image button.

Check this link. I think this is what you want.

http://kyleschaeffer.com/best-practices/pure-css-image-hover/[^]
 
Share this answer
 
Comments
giatuan2011 18-May-12 2:45am    
Thank you.I can use the theme?I think it will support all as tooltip,.....Where can I find a theme?
Monjurul Habib 18-May-12 3:39am    
good link,5+
Try this..

XML
<script language="javascript" type="text/javascript">
      function mouseOver()
{
document.Button1.src ="login-button.gif"
}
function mouseOut()
{
document.Button1.src ="submit.jpg"
}
    </script>


on button write this code

<asp:button id="Button1" runat="server" text="Button" onmouseover="mouseOver()" onmouseout="mouseOut()" xmlns:asp="#unknown">
 
Share this answer
 
Comments
giatuan2011 18-May-12 3:30am    
I have the page use Master.I tried:
<script src="btnImage.js" type="text/javascript"></script>
I put images in folder named Image:
document.Button1.src ="~/Image/BTN.png"
It doesn't work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900