I use asp forms and want to know if standard buttons can be replaced with HTML elements that are styled using CSS.
My login page uses a standard button
<asp:Button ID="LoginButton" runat="server" Text="Login"
onclick="LoginButton_Click" />
linked to code (C #) that performs login validation.
I saw some good buttons implemented using an HTML element <button>and styled using CSS, which can have features like images and scrolling. The basic HTML looks like this:
<button type="submit" class="positive" onclick ="...">
<img src="/icons/tick.png" alt=""/>
Login
</button>
I saw another question discussing the Difference between an asp: button and html button , so I understand that the element is <button>not a replacement, but I'd like to know if it is possible to replace asp:buttonand still call LoginButton_ClickC # code ?
EDIT:
ASP, javascript , .
, , , :
2:
XIII LinkButton asp , , , #
<asp:LinkButton ID="LoginBtn" CssClass="button positive"
OnClick="LoginButton_Click" runat="server">
<img src="/icons/tick.png" alt=""/>
Login
</asp:LinkButton>
Javascript ( ), , ; asp:loginview , , javascript, , .
jwiscarson, , , , , <button> <asp:button>