Question: I have 3 `Buttons` in an aspx page. One for `Save as Draft`, 2nd for `Cancel` and 3rd for `submit`.
Now I want that whenever I click on any of the 3 `Buttons` then all the 3 `Buttons` should get disabled.

Answer: 
You can try like this:

```
private void ButtonDisable(Control ct)
{
    foreach(Control c in ct.Controls)
    {
        if (c is Button)
        {
           c.Enabled = false;;
        }
    }
}

```
This can also be done using JavaScript (without jQuery). The following code uses `document.querySelectorAll` which would work in all modern browsers.

```
var button = document.querySelectorAll('button');

[].forEach.call(button, function (btn) {
    btn.addEventListener("click", function (e) {
        e.preventDefault();
        disableAllButtons();
        return false;
    });
});

function disableAllButtons(){
    [].forEach.call(button, function (btn) {
        btn.disabled=true;
    });
}

```

The [JSFIDDLE](http://jsfiddle.net/taleebanwar/m7gejfdn/).