Solved

ASP.net VB.net Button changing color on mousehover

Posted on 2014-04-14
5
1,025 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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