datagrid触发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();");
}
}
datagrid触发javascript事件
80酷酷网 80kuku.com