Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP.net VB.net Button changing color on mousehover

Posted on 2014-04-14
5
Medium Priority
?
1,077 Views
Last Modified: 2014-04-14
Hi

How do I make a button's back color change on mousehover
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39998444
you can use CSS

<style type="text/css">
.myHoverButton:hover { background-color: #9999ff; }
</style>

set the CSS of button

<button id="button1" class="myHoverButton">

refer
http://www.codeproject.com/Questions/638855/asp-net-using-csharp-and-javascript
http://forums.asp.net/t/1766209.aspx?How+to+change+Button+s+Background+color+on+Mouse+over
0
 

Author Comment

by:Murray Brown
ID: 39998470
Hi. Thanks. I am not totally sure where each bit of code goes
0
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 1000 total points
ID: 39998560
First part , inside head section of html. Second part in body section of the html page.
<html>
<head>
<style type="text/css">
.myHoverButton:hover { background-color: #9999ff; }
</style>
</head></html>
<body>
<button id="button1" class="myHoverButton">
</body>
</html>
0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 1000 total points
ID: 39998589
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
.myHoverButton:hover { background-color: #9999ff; }
</style>

</head>
<body>
    <form id="form1" runat="server">
    <div>
    <button id="button1" class="myHoverButton">Submit</button>

    </div>
    </form>
</body>
</html>
0
 

Author Closing Comment

by:Murray Brown
ID: 39998629
Thank you both
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question