AjaxControlToolkit.PopupControlExtender.Close C# (CSharp) Method

Close() private method

private Close ( string result ) : void
result string
return void
        void Close(string result)
        {
            if(_proxyForCurrentPopup == null) {
                // Normal call - Simply register the relevant data item for the TargetControl
                ScriptManager.GetCurrent(Page).RegisterDataItem(TargetControl, result);
            } else {
                // Proxy call - Add a LiteralControl to pass the information down to the interested PopupControlExtender
                var literalControl = new LiteralControl();
                literalControl.ID = "_PopupControl_Proxy_ID_";
                _proxyForCurrentPopup.Controls.Add(literalControl);
                ScriptManager.GetCurrent(_proxyForCurrentPopup).RegisterDataItem(literalControl, result);
            }
        }