我在前台里放下个ImageButten后台的点击ImageButten后台的RowCommand根本不运行,,请问这是什么回事:
以下是前后台代码:
前台添加一模版列,里面添加一个ImageButton
<asp:TemplateField HeaderText="测试">
<ItemTemplate>
<asp:ImageButton ID="Button1" CommandName="btn" runat="server" \ Text="Button" ImageUrl="~/images/control/del1.gif" />
</ItemTemplate>
</asp:TemplateField>
后台
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "btn")
{ Response.Write("试一下");
}
}



博客
资料
短消息
搜索
加为好友
成为Fans
未选省份
