datagrid触发javascript事件

发表于:2007-06-30来源:作者:点击数: 标签:
触发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();");
}
}

原文转自:http://www.ltesting.net