添加两个按钮,把第二个按钮隐藏起来 <asp:Button ID="btnSubmit" runat="server" Text="提交" onclick="btnSubmit_Click" /> <asp:Button ID="btnExcute" runat="server" Text="执行" onclick="btnExcute_Click" /> //让第二个按钮为执行操作的按钮,并把第二个按钮隐藏了 protected void Page_Load(object sender, EventArgs e) { this.btnExcute.Style.Add("display", "none"); } 第一个按钮的click事件中,执行js代码 protected void btnSubmit_Click(object sender, EventArgs e) { //strMsg是要传的参数,自己定义 Page.ClientScript.RegisterStartupScript(GetType(), "showconfirm", "showConfirm(/""+ strMsg+"/");", true); } 添加js,显示confirm function showConfirm(obj) { var str = obj; if (confirm("你确定吗?" + '/n' + str) == true) { //如果用户点确定,让第二个按钮的点击事件触发 document.getElementById("btnExcute").click(); } } 把要处理的东西写在第二个按钮的click事件中 protected void btnExcute_Click(object sender, EventArgs e) { }