时间:2021-07-01 10:21:17 帮助过:11人阅读
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;
}
}
2.如果是模板列中的button直接click事件
利用sender 取其parent 也可以实现