This is the Javascript to disable the button and activates Server Side button click

<script type="text/javascript">
function disableButton(btn) {
btn.value = 'Processing...';
btn.disabled = 'disabled';
__doPostBack("btnRegister", "onclick");
/*Notice that i can access the onclick event from the server side in Javascript now
thanks to Page.ClientScript.GetPostBackEventReference(btnRegister,"onclick");
with the __doPostBack that activates the button click event.*/
}
</script>