this
.Btn_Upload.Attributes.Add(
"
onclick
"
,
"
this.value='Please wait..'; this.disabled=true;
"
+
ClientScript.GetPostBackEventReference( this .Btn_Upload, "" ));
ClientScript.GetPostBackEventReference( this .Btn_Upload, "" ));
The GetPostBackEventReference injects the __doPostBack method and
also the hidden fields that hold the event target and event arguments.
This is a useful technique when
uploading large files and during the process disabling the button control.