RowCommand
<asp:LinkButton ID="lbtnLogisticsEdit" runat="server" CommandName="LogisticsEdit" Text ="编辑"></asp:LinkButton>
protected void grvOrderInfo_RowCommand(object sender, GridViewCommandEventArgs e)
{
GridViewRow row = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
Label lblListId = (Label)row.FindControl("lblListId");
if (e.CommandName == "LogisticsEdit")
{
}
}
浙公网安备 33010602011771号