|
楼主 |
发表于 2020-3-24 15:30:01
|
显示全部楼层
后台页面:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Fun_Test_Default : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
}
protected void btnSave_Click(object sender, EventArgs e) {
string strScript = "";
int resultNum = -1;
if (resultNum == -2) {
strScript = "<script>alert('该联系单已存在!');</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "提示", strScript);
return;
} else if (resultNum == -1) {
strScript = "<script>alert('新增失败!');</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "提示", strScript);
return;
} else {
strScript = "<script>alert('新增成功!');window.opener.location='monitor.aspx';window.close();</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "提示", strScript);
}
}
}
|
|