Q:

Disable 2 buttons on form submission ( ASP.NET )

I have this solution for a single button:
myButton. Attributes. Add("onclick", "this.disabled=true;" + GetPostBackEventReference(myButton).ToString());

Which works pretty well for one button, any ideas on how to expand this to 2 buttons? 

A:

You could add an clientside onSubmit handler, or you could do this:
myButton. Attributes. Add("onclick", "this.disabled=true; document.getElementById('" 
+ button2.ClientID + "').disabled = true;" 
+ GetPostBackEventReference(myButton).ToString());

