如何将命令参数传递给asp.net gridview的ROW UPDATING EVENT
问题描述:
我有一个问题,如何将我的按钮的命令参数传递给asp.net gridview的行更新事件?
我有这个代码:
I have a question, how do I pass my button's command argument to the row updating event of asp.net gridview?
I have this code:
<asp:Button ID="btnEdit" runat="server" CommandName="Edit" Text="Edit" CommandArgument='<%# Eval("id") %>' />
我用我的删除按钮和工作正常,
I have used this with my delete button and its working fine,
int Deleteid = int.Parse((sender as ImageButton).CommandArgument);
我把代码放在里面我的按钮的点击事件。
我的问题是,如何触发此命令参数。 ROW UPDATING里面的编辑按钮
,因为我只需更新具有id的ROW就像我在删除事件中所做的那样,请帮助!
I placed the code inside the ON CLICK EVENT OF MY BUTTON.
my question is, how do I fire this command argument. my edit button inside ROW UPDATING
since I need to update only the ROW which has the "id" just like what I did in my delete event, help please!
答