datagrid触发javascript事件

类别:Asp 点击:0 评论:0 推荐:
 触发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://com.8s8s.com/it/it8292.htm