如果页面中不用Ajax
cs中运行某段js代码方式可以是:
Page.ClientScript.RegisterStartupScript(Page.GetType(),””,”window.open...对这种情况我们通常采用:
ScriptManager.RegisterStartupScript(UpdatePanel1,typeof(UpdatePanel), “success”, “alert...例子
UpdatePanel ID=”UpdatePanel1″runat=”server”>
...,typeof
(UpdatePanel), “success”, “alert(‘更新成功’)”, true);
}...(UpdatePanel), “wrong”, “alert(‘更新失败,请重新操作’)”, true);
}
}
发布者:全栈程序员栈长,转载请注明出处