<asp:Button ID="btnPay" runat="server" Text="确认无误,付款" onclick="btnPay_Click" OnClientClick="return btnSubmit(this);" class="payButton" ValidationGroup="PayGroup"/>
function btnSubmit(obj) { if (Page_ClientValidate()) { obj.disabled = true; $(obj).val('数据提交中...'); return true; } return false; }
点击btnpay后先执行btnSumbit,返回true执行onclick事件,
protected void Page_Load(object sender, EventArgs e) { if (!IsLogined) { Response.Redirect("Login.aspx?redirect_url=" + Server.UrlEncode(Request.Url.AbsoluteUri)); } if (!CheckQueryString()) { Response.Redirect("PayError.aspx?type=error"); } if (IsPostBack) return; if (!payUnit.IsPay()) { Response.Redirect("PayError.aspx?type=order"); } BindControl(); }
每次执行到ispostback就直接return再跳到最下面}结束了.
哎,郁闷.
添加回答
举报
0/150
提交
取消