Try some thing like this
<asp:templatefield headertext="Employee Image" xmlns:asp="#unknown">
<itemtemplate>
<a href="Default.aspx?Id='<%# Eval("empid") %>">
<asp:image id="EmpImg" width="40" height="40" runat="server" />
</a>
</itemtemplate>
</asp:templatefield>