<script type="text/javascript">
function mainCall() {
var lb = document.getElementById('gvlblName').innerHTML;
alert(lb);
var name = $(obj).closest('tr').find('td:eq(0)').text();
alert(name);
}
</script>
===============================
<asp:GridView ID="grdRegister" runat="server" AutoGenerateColumns="false" >
<Columns>
<asp:TemplateField HeaderText="UserName">
<ItemTemplate>
<a href="#" id="na" onclick="mainCall();" >
<asp:Label ID="gvlblName" runat="server" text='<%#Eval("UserName")%>'></asp:Label>
</a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
========================================================
error popup : The name 'gvlblName' does not exist in the current context
error popup : undefiend