asp.net中用LinkButton取到gridview中当前行的ID值
//前台
<asp:LinkButton ID="LinkButton3" runat="server" Text ="删除" ForeColor="#7B7B7B"
CommandArgument='<%# Eval("ID") %>' onclick="LinkButton3_Click"
onclientclick="return confirm('你确定要删除该条信息吗?')"></asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" Text ="删除" ForeColor="#7B7B7B"
CommandArgument='<%# Eval("ID") %>' onclick="LinkButton3_Click"
onclientclick="return confirm('你确定要删除该条信息吗?')"></asp:LinkButton>
//后台
string ID=((LinkButton)sender).CommandArgument.ToString();