我有我的C#背景下,这个按钮:如何传递参数单击事件方法使用C#
<button id='Update' OnServerClick='UpdateCart'>Update</button>
现在我想通过参数(NUM)至(UpdateCart)方法:
protected void UpdateCart(object sender, EventArgs e)
{
Response.Cookies["Cart"]["Qty(" + num + ")"] = Request.Form["Qty" + num];
}
我该怎么做?
尽我所能,但仍然无法访问值(e.CommandArgument)它是空的 – Hatem 2011-12-16 05:51:07