- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: ASP.NET + PayPal + IE10 problem
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "ASP.NET + PayPal + IE10 problem"
Collapse
-
Many thanks. Don't get any script errors, but otherwise that makes a lot of sense. The hotfix wouldn't install on the server, but I don't think it even has .NET2 SP2 installed, so I need to do some updating and cross fingers it doesn't all break.
-
-
ASP.NET + PayPal + IE10 problem
I've had a few reports of a shopping basket system I implemented a few years ago in C# ASP .NET not working with IE10. This is .NET 2.0, and compiled now with VS2010 Pro but originally 2005. Predictably it works fine when I debug it on my laptop in both debug and release, but doesn't work on the old IIS6 server.
This is what should happen:
1. The user goes to a pay page called DoDirectPayment.aspx with fields for name, address, credit card numbers etc. Then they press a submit button. The submit button has a client side script which disables itself and changes its text to "Please wait".
2. The submit button should call PayButton_Click function on the server, which sets session variables and does Response.Redirect("DoHostedPayment2.aspx");
3. DoHostedPayment2.aspx displays "contacting payment provider" and has an invisible form which is filled out by the server and posted immediately to PayPal with some client side JS.
4. PayPal displays its customised page with our logo etc.
With IE10, the redirect to DoHostedPayment2.aspx doesn't appear to work. The submit button correctly disables itself, and changes its text, and then the same page reloads (with the submit button enabled again). So I'm guessing it isn't managing to call the onClick handler on the server.
Code:
I'm getting a warning that GetPostBackEventReference is obsolete, but surely as all this predates IE10 by a number of years that can't be the reason?Code:private void Page_Load(object sender, System.EventArgs e){ System.Text.StringBuilder sbValid = new System.Text.StringBuilder(); sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { "); sbValid.Append("if (Page_ClientValidate() == false) { return false; }} "); sbValid.Append("this.value = 'Please wait...';"); sbValid.Append("this.disabled = true;"); sbValid.Append("document.all.PayButton.disabled = true;"); // this much must be working //GetPostBackEventReference obtains a reference to a client-side script function that causes the server to post back to the page. sbValid.Append(this.Page.GetPostBackEventReference(this.PayButton)); sbValid.Append(";"); this.PayButton.Attributes.Add("onclick", sbValid.ToString());
This is what it generates on the client onClick handler:
I don't really understand by what voodoo the above makes the server call its PayButton_Click handler, but it does in the other browsers, and does in the debugger.Code:__doPostBack('PayButton',''); WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("PayButton", "", true, "", "", false, false))
Does anyone know what's going on here?Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: