I assume you must have used DataGridViewLinkColumn to display your HyperLinks. In that case, in order to repspond to User Clicks on HyperLinks, you must handle the CellContentClick event. This event is distinct from the CellClick and CellMouseClick events, which occur when a user clicks anywhere in a cell.
for asp.net gridview
with in a gridview write like
<asp:gridview id="gvDeleteUsers" runat="server" width="321px" xmlns:asp="#unknown">
AutoGenerateColumns="False" onrowdeleting="gvDeleteUsers_RowDeleting"
BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
CellPadding="4" Font-Names="Verdana" Font-Size="Small">
<rowstyle backcolor="White" forecolor="#330099" horizontalalign="Center">
VerticalAlign="Middle" />
<columns>
<asp:templatefield headertext="UserName">
<itemtemplate>
<asp:linkbutton id="TypenameLabel" runat="server" cssclass="style_homefirst" text="<%# Eval("Text") %>" />
</itemtemplate>
<asp:commandfield showdeletebutton="true" />
</columns>
<footerstyle backcolor="#FFFFCC" forecolor="#330099" />
<pagerstyle backcolor="#FFFFCC" forecolor="#330099" horizontalalign="Center" />
<selectedrowstyle backcolor="#FFCC66" font-bold="True" forecolor="#663399">
HorizontalAlign="Center" VerticalAlign="Middle" />
<headerstyle backcolor="#990000" font-bold="True" forecolor="#FFFFCC" />
</selectedrowstyle></rowstyle>
here in Eval write ur database field name for which u want to create link button.