Change Button Color On MouseOver In Asp.Net
In this post we will learn How to Change Button Color On MouseOver In Asp.Net. We have used CSS for this.
Design:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Change Button Color On MouseOver In Asp.Net</title> <style type="text/css"> body { width: 980px; margin: 0px auto; text-align: center; padding-top: 50px; font-size: 20px; } .ccolor:hover { color: white; font-size:14px; padding:5px; background-color:green; border:none; } </style> </head> <body> <form id="form1" runat="server"> <div> <h2>Change Button Color On MouseOver In Asp.Net</h2> <br /><br /> <asp:Button ID="chngcolor" runat="server" Text="Submit" CssClass="ccolor" /> <br /><br /> <br /><br /> All rights reserved by <a href="http://www.hightechnology.in">www.Hightechnology.in</a> | Hosting partner <a href="http://www.grootstech.com" target="_blank">Grootstech</a> </div> </form> </body> </html>