我找到了问题的答案。
我的答案:
protected void DViewComputer_DataBound1(object sender, EventArgs e){ int noRow = DViewComputer.Rows.Count - 1;//get the no of record if (noRow >0) { Button button = (Button)(DViewComputer.Rows[noRow].Cells[0].Controls[2]); // Add delete confirmation ((System.Web.UI.WebControls.Button)(button)).onClientClick = "if (!confirm('Are you sure " + "you want to delete this record?')) return;"; }}
无论如何,感谢您的帮助。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)