I am developing a C# ASP.Net project. And I would like to do something very similar to what is shown in the following website.
However, that is a solution for the HTML <a> tag, and I am looking for a solution for ASP.NET buttons.
What are my options?
<asp:LinkButton />is a good choice. It is virtually identical to<asp:Button />, except it creates a form enacting hyperlink that you can put any image in it that you want to.I stress using
LinkButtoninstead ofImageButtonbecauseImageButtonuses different event handlers, which makes it difficult to switch back and forth between them. WithLinkbuttonsandButtons, they use the same event handlers, so it’s rather easy to switch between them.