for (int i=0; i<this.DataGrid1.Items.Count; i++)
{
((Button)this.DataGrid1.Items[i].Cells[2].FindControls["Button1"]).Attribute.Add("onClick", "return confirm('确实要删除该行数据码?');");
}------------------------------
代码是随手写的,只代表实现的方式,请勿粘贴使用!
{
((Button)this.DataGrid1.Items[i].Cells[2].FindControls["Button1"]).Attribute.Add("onClick", "return confirm('确实要删除该行数据码?');");
}------------------------------
代码是随手写的,只代表实现的方式,请勿粘贴使用!
解决方案 »
- asp.net点击修改
- gridviw中日期字段格式化字符串后的问题
- |M| 我们都知道DropDownList有Value属性和Text属性,Text用来显示Value用来更新,但Button又要用什么来做关键字呢
- TreeView问题 应该很简单 请大家指教
- 请问,如何添加百度搜索功能
- asp.net 如何彻底删除一个XML文档的节点。
- 让人发疯的问题,请求大家帮忙!关于System.Data.SqlClient.SqlException
- 请教:如何复用用户控件?
- treeview的问题
- 广州哪里有visual studio.net7.0或中文版cd卖?
- 怎样用showModalDialog传值的同时控制窗体大小?????
- 非常急!这个问题如何解决
Dim bu as button= e.Item.FindControl("button1")
bu.Attributes.Add("onclick", "…………")
end if
{
e.Item.Cells[0].Controls[0].Attributes.Add("onclick","alert(this.innerText)");
}