<asp:ButtonField ButtonType="Image" ImageUrl="~/Images/pdf.png" CommandName="pdf_click" ID="imgprint"/>
Code behind
void GridView1_RowCommand(Object sender, GridViewCommandEventArgs e)
{
if(e.CommandName=="pdf_click")
{
int index = Convert.ToInt32(e.CommandArgument);
ButtonField cf = (ButtonField)e.Row.FindControl("imgprint");
cf.ImageUrl = "images/something.png";
}
}