?
Solved

ASP.net VB.net Button changing color on mousehover

Posted on 2014-04-14
5
Medium Priority
?
1,062 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

771 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