My solution is to use javascript and place it in between the of the aspx page.
<script type="text/javascript">
function abc(signOut) {
var img = document.getElementById(signOut.id);
img.src = "/Images/click.png";
return false;
}
</script>
And this is my imagebutton in gridview...
<asp:TemplateField HeaderText="Sign Out">
<ItemTemplate>
<asp:ImageButton OnClientClick="return abc(this);" ID="signOut" CommandName="Insert" AlternateText="Available" ImageUrl="~/Images/unclick.png" runat="server" />
</ItemTemplate>
</asp:TemplateField>