Anchor Link Clicked Event (VB.net) : Link « HTML Control « ASP.Net






Anchor Link Clicked Event (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    Anchor1.InnerHTML = "<B>Click Me Anchor1 in Bold</B>"
    Anchor1.HREF = "http://www.google.com"
    Anchor1.Target = "New"
    Anchor3.InnerText = "<B>Not in Bold and disabled</B>"
    Anchor3.Disabled = True
End Sub

Sub Anchor_Click(Source As Object, E as EventArgs)
    Anchor2.InnerHtml = "<B>YOU CLICKED THE LINK!!!</B>"
End Sub

</SCRIPT>
<HTML>
<HEAD>
<TITLE>Anchor Sample Page</TITLE>
</HEAD>
<BODY>
<form runat="server">
<Font Face="Tahoma" Size="+1">
<a
    id="Anchor1"
    runat=server
>
</a>
<BR><BR>
<a 
    id="Anchor2"
    OnServerClick="Anchor_Click" 
    runat=server
>Click Me
</a>
<BR><BR>
<a
    id="Anchor3"
    OnServerClick="Anchor_Click" 
    runat=server
>
</a>
</Font>
</Form>
</BODY>
</HTML>
           
       








Related examples in the same category