protected void lpg_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ItemCollect") { GridViewRow gvr = (GridViewRow)(((LinkButton)(e.CommandSource)).NamingContainer); LinkButton lk = lpgKnowledgeExchange.Rows[gvr.RowIndex].FindControl("lbtnCollect") as LinkButton; } }