ahm*_*med 1 .net c# asp.net events imagebutton
我有以下按钮
<asp:ImageButton ID="button1" runat="server"
ImageUrl="~/image.jpg"
CommandName = "id"
CommandArgument = "1"
onclick="button1_Click"
/>
Run Code Online (Sandbox Code Playgroud)
并在代码背后
protected void button1_Click(object sender, ImageClickEventArgs e)
{
Response.Write(e.commandName);
}
Run Code Online (Sandbox Code Playgroud)
这不起作用!!,所以我的问题是如何从按钮控制获得价值?