M
Matt
Hello,
In an aspx page i have webform with some textboxes and a simple
button. When the button is clicked, there is a postback and then the
code in the click event of the button is executed.
However in this code (click event of the button), i'm processing an
online payment, which takes about 5 seconds. While waiting for the
payment to be processed, the user can click again on the button, and
this is what i want to block. I want to disable the button once
clicked, and then execute the code for the web payment.
However when we disable a button in the Load event, the page is only
displayed after the Unload event, so the button still appears as
enabled when executing the code in the click event of the button.
I tried to call a javascript function on the onclick of the button to
disable it but i get a compilation error at runtime. Is there a way to
disable a webform button when clicked, then execute the code on the
Click event of this button? The button needs to appear as disabled on
the page before the code is executed.
Thanks for any help!
In an aspx page i have webform with some textboxes and a simple
button. When the button is clicked, there is a postback and then the
code in the click event of the button is executed.
However in this code (click event of the button), i'm processing an
online payment, which takes about 5 seconds. While waiting for the
payment to be processed, the user can click again on the button, and
this is what i want to block. I want to disable the button once
clicked, and then execute the code for the web payment.
However when we disable a button in the Load event, the page is only
displayed after the Unload event, so the button still appears as
enabled when executing the code in the click event of the button.
I tried to call a javascript function on the onclick of the button to
disable it but i get a compilation error at runtime. Is there a way to
disable a webform button when clicked, then execute the code on the
Click event of this button? The button needs to appear as disabled on
the page before the code is executed.
Thanks for any help!