1*.aspx.cs
string IsSucess="false";
try
{
IsSucess="true";
}
catch
{
IsSucess="false";
}
string strTmp="<script language=javascript>ExitWindow("+IsSucess+");</script>";
if(!this.IsClientScriptBlockRegistered("clientScript"))
this.RegisterStartupScript("clientScript", strTmp);
2*.aspx[HTML]
<script language="javascript">
<!--

function ExitWindow(sure)
{
if(sure)
window.close();
else
{
window.alert("删除失败!\n请先删除关联的记录后,在重试此操作。");
window.close();
}
}

//-->
</script>