Hi Dale,
One example of how to prevent clicking a button again after it has been clicked is like this:
c#
btnMakePayment.Attributes.Add("onclick", "this.value='" + WebStoreResources.PaymentButtonDisabledText + "';this.disabled = true;" + Page.ClientScript.GetPostBackEventReference(this.btnMakePayment, ""));
This example comes frome the e-commerce feature of mojoPortal (not a complated feature yet) found in the WebStore.sln solution, in the WebStore.UI project in Checkout.aspx.cs.
Note that this only prevents the clicked button from being clicked again. To disable all buttons you might call a javascript function
ex javascript:
disableButtons(){
var buttons = document.getElementsByTagName('button');
for (var i = 0, el; el = buttons[i]; i++) {
el.disabled = true;
}
}
server side c#:
btnMakePayment.Attributes.Add("onclick", "this.value='" + WebStoreResources.PaymentButtonDisabledText + "';disableButtons();" + Page.ClientScript.GetPostBackEventReference(this.btnMakePayment, ""));
if that doesn't work you might change one line of the javascript to:
var buttons = document.getElementsByTagName('input');
These are just ideas that should work in theory, not tested code except the first example which as I mentioned only disables the clicked button, not all the buttons.
Hope it helps,
Joe