62,046
社区成员
发帖
与我相关
我的任务
分享
try
{
conn.Open();
int a = cmd.ExecuteNonQuery();
if (a == -1)
{
Response.Write("<script language=javascript>alert('添加失败');location='javascript:history.go(-1)'</script>");
}
else
{
//Response.Write("<script language=javascript>alert('添加成功');</script>");
}
}
catch(Exception ex)
{
// Response.Write("<script language=javascript>alert('"+ex.ToString()+"');location='Test.aspx'</script>");
ScriptManager.RegisterStartupScript(udp1, typeof(UpdatePanel), "scriptname", "alert('" + ex.ToString() + "');", true);
}
this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('测试输出!')", true);