C# gridview上的图像按钮未触发asp.net
所以我有一个带有imagebutton的gridview,问题是它从不触发。我不知道为什么。这是代码C# gridview上的图像按钮未触发asp.net,c#,asp.net,gridview,C#,Asp.net,Gridview,所以我有一个带有imagebutton的gridview,问题是它从不触发。我不知道为什么。这是代码 <asp:GridView ID="GridView1" runat="server" Width="233px" OnCommand="GridView1_RowCommand" onrowcommand="GridView1_RowCommand" DataKeyNames="Nombre"> <Columns> <as
<asp:GridView ID="GridView1" runat="server" Width="233px"
OnCommand="GridView1_RowCommand" onrowcommand="GridView1_RowCommand"
DataKeyNames="Nombre">
<Columns>
<asp:TemplateField HeaderText="" ItemStyle-Width="12%" ItemStyle-
HorizontalAlign="Center" >
<ItemTemplate>
<asp:ImageButton ID="lnkEditar" runat="server" CommandName="Edit"
ImageUrl="Imagenes/edit.png" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
我调试了它,但它从未触发RowCommand事件。谢谢你的帮助 尝试按以下方式更改
OnRowCommand
OnRowCommand="GridView1_RowCommand"
@nahuel并尝试将命令名更改为
Edit1
,然后检查是否使用了updatepanel?
OnRowCommand="GridView1_RowCommand"