如何使用onclick事件送价值?
-
20-08-2019 - |
题
我有以下按钮
<asp:ImageButton ID="button1" runat="server"
ImageUrl="~/image.jpg"
CommandName = "id"
CommandArgument = "1"
onclick="button1_Click"
/>
和在后面的代码
protected void button1_Click(object sender, ImageClickEventArgs e)
{
Response.Write(e.commandName);
}
这不工作!,所以我的问题是如何获得价值frombutton控制?
不隶属于 StackOverflow