protected override void OnPreRender(EventArgs e)
        {
            InvokeWebService invokeWebService = new InvokeWebService();

            invokeWebService.ID = "webServiceBehavior";
            invokeWebService.TargetControlID     = "btnTroubleShoot";
            invokeWebService.EnableProgressPopup = true;
            invokeWebService.CloseAfterSuccess   = true;
            invokeWebService.WebServiceMethods.Add(this.SendLogWebServiceMethod);
            invokeWebService.ProgressDescription = OwaOptionStrings.Processing;
            base.ContentContainer.Controls.Add(invokeWebService);
            base.OnPreRender(e);
        }
        protected override void OnPreRender(EventArgs e)
        {
            int count = this.SaveWebServiceMethods.Count;

            if (this.State != ButtonsPanelState.ReadOnly && count > 0)
            {
                this.invokeSaveWebService    = new InvokeWebService();
                this.invokeSaveWebService.ID = "webServiceBehaviorForCommit";
                this.invokeSaveWebService.TargetControlID     = this.btnCommit.ID;
                this.invokeSaveWebService.EnableConfirmation  = true;
                this.invokeSaveWebService.EnableProgressPopup = true;
                this.invokeSaveWebService.IsSaveMethod        = true;
                if (this.State == ButtonsPanelState.SaveCancel || this.State == ButtonsPanelState.Wizard)
                {
                    this.invokeSaveWebService.CloseAfterSuccess = true;
                }
                if (this.State == ButtonsPanelState.SaveCancel)
                {
                    if (count > 1)
                    {
                        throw new InvalidOperationException("Have more than one SaveWebServiceMethod while ButtonPanel state is SaveCancel.");
                    }
                    this.invokeSaveWebService.AssociateElementID = this.btnCancel.ClientID;
                }
                else if (this.State == ButtonsPanelState.Wizard)
                {
                    this.invokeSaveWebService.AssociateElementID = this.btnBack.ClientID + "," + this.btnCancel.ClientID;
                }
                this.Controls.Add(this.invokeSaveWebService);
            }
            if (this.State == ButtonsPanelState.SaveCancel && this.LoadWebServiceMethod != null)
            {
                InvokeWebService invokeWebService = new InvokeWebService();
                invokeWebService.ID = "webServiceBehaviorForReload";
                invokeWebService.TargetControlID = this.btnCancel.ID;
                invokeWebService.WebServiceMethods.Add(this.LoadWebServiceMethod);
                this.Controls.Add(invokeWebService);
                InvokeWebService invokeWebService2 = new InvokeWebService();
                invokeWebService2.ID = "webServiceBehaviorForDisableSave";
                invokeWebService2.TargetControlID = this.btnCommit.ID;
                invokeWebService2.Trigger         = string.Empty;
                invokeWebService2.WebServiceMethods.Add(this.LoadWebServiceMethod);
                this.Controls.Add(invokeWebService2);
            }
            base.OnPreRender(e);
        }