Slip 12 Q.A) Problem Statement
Q. Write an ASP.Net program that displays a button in green color and it should change to yellow when the mouse moves over it. 15 Marks
Q. Write an ASP.Net program that displays a button in green color and it should change to yellow when the mouse moves over it. 15 Marks
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Button Hover Example</title>
<style>
.greenButton {
background-color: green;
color: white;
padding: 10px 20px;
border: none;
font-size: 16px;
cursor: pointer;
}
.greenButton:hover {
background-color: yellow;
color: black;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server"
Text="Click Me"
CssClass="greenButton" />
</div>
</form>
</body>
</html>
