views:

51

answers:

2

On one of my ASP.NET pages I have several asp:textbox fields. On this page there is a "confirm order" button with an external url set in its "PostBackUrl" property.

This works well, and the data is sent to the external site. Here comes the question; how do I know that the user clicked the "confirm order" button on "my side?" (I need this to update my order-status field). There is off course no postback happening on my page becasue the form is submitted to the external site.

Maybe it's possible to use some sort of jQuery to hook on the onclick-event that will call a page that will update my order-status?

A: 

Better to set it up so that the button does perform a postback. Then in your click handler you can update your order-status, and then post the data to the third party.

UpTheCreek
I need the browser to submit/post the data (not the server), can I do that without having to have the user click the submit-button again?
Espo
+1  A: 

You'll need to hook into the buttons onClick event, perform a client-side callback to either a web service or Page Method (depending on your preferred setup) on your server to track the click, before allowing the form submission to continue.

Zhaph - Ben Duguid