Disable-Enable all controls of page using jQuery
$(document).ready(function() { $("#btnEnableDisable").toggle(function() { $("*").attr("disabled", "disabled"); $(this).attr("disabled", ""); }, function() { $("*").attr("disabled", ""); }); });
As it's clear from code, toggle function is used for button. We set the "disabled" attribute of all the controls to "disabled" to make all the control disable. To enable all the control, we set blank value to "disabled" attribute. One thing to note here is that when we are disabling all the controls, it will also disable the button control. So we need to enable the button control, while disabling all the controls.
Feel free to contact me for any help related to jQuery. I will gladly help you.