Solved

ASP.net VB.net Button changing color on mousehover

Posted on 2014-04-14
5
1,012 Views
Last Modified: 2014-04-14
Hi

How do I make a button's back color change on mousehover
0
Comment
Question by:murbro
  • 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:murbro
ID: 39998470
Hi. Thanks. I am not totally sure where each bit of code goes
0
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 250 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 250 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:murbro
ID: 39998629
Thank you both
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now