I am using the following HTML and CSS design for my web app - https://codepen.io/andytran/pen/PwoQgO
I needed to replace the button tag <button>Login</button> with the following,
<asp:Button ID="bnLogin" runat="server" Text="Login" OnClick="bnLogin_Click" />
The problem is that I lose the CSS style when I use the asp:Button element instead of the button element.
Here is the corresponding HTML -
<div class="form">
<h2>Login to your account</h2>
<form id="form1" runat="server">
<asp:TextBox ID="txtUserID" runat="server" Columns="50" placeholder="User ID" ></asp:TextBox>
<asp:TextBox ID="txtUserPassword" runat="server" Columns="50" TextMode="Password" placeholder="Password"></asp:TextBox>
<asp:Button ID="bnLogin" runat="server" Text="Login" OnClick="bnLogin_Click" />
<br />
<asp:Label ID="lblMsg" ForeColor="red" runat="server" />
</form>
</div>
And the corresponding CSS -
.form-module button {
cursor: pointer;
background: #33b5e5;
width: 100%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module button:hover {
background: #178ab4;
}