asp.net - How to change HyperLink image url

How to set, change HyperLink image url (ImageUrl)
HyperLinkImageUrl.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        HyperLink1.ImageUrl = "~/Images/CheckBox1.gif";
    }
    protected void Button2_Click(object sender, System.EventArgs e)
    {
        HyperLink1.ImageUrl = "~/Images/CheckBox2.gif";
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to set, change HyperLink image url (ImageUrl)</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Green">HyperLink Example: ImageUrl</h2>
        <asp:HyperLink 
             ID="HyperLink1"
             runat="server"
             ImageUrl="~/Images/CheckBox.gif"
             NavigateUrl="~/CheckBox/CheckBoxSkinID.aspx"
             BorderWidth="2"
             BorderColor="LightBlue"
             >
        </asp:HyperLink>
        <br /><br />
        <asp:Button 
             ID="Button1" 
             runat="server"
             ForeColor="SaddleBrown"
             Text="HyperLink Change ImageUrl"
             Height="45"
             OnClick="Button1_Click"
             Font-Bold="true"
             />
        <asp:Button 
             ID="Button2" 
             runat="server"
             ForeColor="SaddleBrown"
             Text="HyperLink Another ImageUrl"
             Height="45"
             OnClick="Button2_Click"
             Font-Bold="true"
             />
    </div>
    </form>
</body>
</html>








More asp.net example