Hi, Doug,
ASP:Hyperlink doesn't have a server Click event. Init
event occurs when the server control is initialized, which
is the first step in the its lifecycle. This is fired even
before it is rendered.
If you need a server Click event, use LinkButton in stead.
If you need a client onclick event, do like the following:
Hyperlink1.Attributes("onclick") = "javascript
:alert('The
hyperlink is clicked!');"
Bin Song, MCP
-----Original Message-----
I have an asp:hyperlink that I need to have some code
fire when the link isclicked. The link is in a datagrid and the link is
working properly. I triedusing the OnInit event to call the subroutine but that
fires when thecontrol is rendered. I need the code to fire only when
the users clicks onone of the links in the datagrid.
Any help would be appreciated,
Doug
.