Its pretty simple.
GridView1_RowCommand
can be used to serve your puspose. On click of Active image button in the gridview, identify the GridViewRow
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false" xmlns:asp="#unknown">
OnRowCommand = "GridView1_RowCommand">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:label runat="server" text="<%#Eval("SNo")%>" id="lblSNo" />
</itemtemplate>
</asp:templatefield>
<asp:templatefield>
<itemtemplate>
<asp:imagebutton id="imgStatus" commandname="Update" runat="server" src="../Active.jpg" alt="Image" />
</itemtemplate>
</asp:templatefield>
</columns>
</asp:gridview>
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow gvRow = GridView1.Rows[index];
string sNo = gr.Cells[0].Text;
bool isActive = true;
}
Hope this helps.