Hi
Try this sample , this might help you..
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
var showimage = function (thisobject) {
var image = $('img[id*="imageFaculty"]', $(thisobject).parent().parent());
if( image.css('display') == 'block')
image.css('display', 'none');
else
image.css('display', 'block');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="validateradios(); return false;" />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%">
<Columns>
<asp:TemplateField HeaderText="Required Access">
<ItemTemplate>
<asp:LinkButton ID="btnFaculty" runat="server" OnClientClick="showimage(this); return false;"
Text='<%# Eval("Faculty") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Required Access">
<ItemTemplate>
<asp:Image ID="imageFaculty" ImageUrl='<%# Eval("imageurl") %>' runat="server" Style="display: none" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>
</body>
</html>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("Faculty", typeof(string));
dt.Columns.Add("imageurl", typeof(string));
dt.Rows.Add("sathish", "clickMe.png");
dt.Rows.Add("karthik", "clickMe.png");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
note: Add Jquery reference to it..
http://code.jquery.com/jquery-1.10.2.min.js[
^]