GridView_RowCommand 得到选择行的主键值

yzaiml yzaiml 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<asp:GridView ID="gvCustomer" runat="server" AutoGenerateColumns="False" OnRowCommand="gvCustomer_RowCommand">
<Columns>
<asp:BoundField DataField="CustomerCode" HeaderText="客户号" />
<asp:BoundField DataField="CustomerName" HeaderText="客户姓名" />
<asp:CommandField ShowSelectButton="True" HeaderText="选择" />
</Columns>

</asp:GridView>

protected void gvCustomer_RowCommand(object sender, GridViewCommandEventArgs e)
在这里里面我想要执行一个方法 当我点选择按钮的时候后
方法public void bindCustomerInfo(int CustomerId) 绑定这行的值
如何得到?
...全文
评论 8
收藏 已收藏
分享
返回顶部
yzaiml
.NET社区 62,272 成员 668,968 内容