最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
datagrid触发javascript事件
时间:2022-06-30 10:18:12 编辑:袖梨 来源:一聚教程网
触发javascript事件
public static void DG_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
LinkButton l=new LinkButton();
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem )
{
l = (LinkButton)e.Item.Cells[0].FindControl("del");
l.Attributes.Add("onclick", "return Delete();");
}
}
public static void DG_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
LinkButton l=new LinkButton();
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem )
{
l = (LinkButton)e.Item.Cells[0].FindControl("del");
l.Attributes.Add("onclick", "return Delete();");
}
}