62,244
社区成员




protected void grdBooks_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType != DataControlRowType.DataRow)
{
return;
}
LinkButton lbl= e.Row.FindControl("LabelID") as LinkButton;
if (lbl != null)
{
lbl.CommandArgument = e.Row.RowIndex.ToString();
}
}
protected void grdBooks_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "xxx" && e.CommandArgument != null)
{
int rowIndex = int.Parse(e.CommandArgument);
}
}