Solved

ASP.net VB.net Button changing color on mousehover

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

How do I make a button's back color change on mousehover
0
Comment
Question by:murbro
[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: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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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