I have an ASP.NET 2 page with a button that causes a credit card transaction
to be authorised. The authorisation procedure may take a few seconds and so
I want to prevent the user from clicking the button again (or at least
detect that an authorisation is already in progress and do nothing) while
the first authorisation is in progress. Can someone help me out?
I've tried the following but none of the solutions work:
1) Disabling the button via JavaScript when it is clicked. This prevents the
server-side event from firing.
2) Disabling the button via JavaScript when it is clicked and calling
doPostback. This just causes an 'Object Expected' error. (I have fully
qualified the button's Id as the first parameter passed to doPostback.)
3) Disabling the button in the server-side Click event. The button is not
disabled until the Click event is finished. (i.e. After the authorisation)
to be authorised. The authorisation procedure may take a few seconds and so
I want to prevent the user from clicking the button again (or at least
detect that an authorisation is already in progress and do nothing) while
the first authorisation is in progress. Can someone help me out?
I've tried the following but none of the solutions work:
1) Disabling the button via JavaScript when it is clicked. This prevents the
server-side event from firing.
2) Disabling the button via JavaScript when it is clicked and calling
doPostback. This just causes an 'Object Expected' error. (I have fully
qualified the button's Id as the first parameter passed to doPostback.)
3) Disabling the button in the server-side Click event. The button is not
disabled until the Click event is finished. (i.e. After the authorisation)
Comment