Code
<script language="javascript">
function ImgDeleteClick(id){
if(window.confirm("您确认要删除吗?"))
{
document.getElementById("hdDel").value=id;
document.forms[0].submit();
}
}
</script>
<asp:TemplateColumn>
<ItemTemplate>
<img src="images/delete.gif" onclick="ImgDeleteClick('<%# Eval("Record_ID") %>')" />
</ItemTemplate>
</asp:TemplateColumn>
<input type=hidden id="hdDel" value="" runat=server />
if (!string.IsNullOrEmpty(hdDel.Value))
{
//Delete(hdDel.Value);
IMPEntry ie = new IMPEntry();
ie.ConnectString = Application["Conn"].ToString();
ie.DeleteComponent(int.Parse(hdDel.Value));
hdDel.Value ="";
Response.Write("<script>alert('删除成功!');window.location.href='"+this.Request.RawUrl+"'</script>");
}
posted @
2008-12-18 10:35
paymob
阅读(
247)
评论()
编辑
收藏
举报