protected override void CreateChildControls()
        {

            if (State == ControlState.Designtime || State == ControlState.Preview)
            {
                this.Controls.Add(new Literal() { Text = "The Session Variable Reader" });
            }

            InternalControls.InternalPanel panel = new InternalPanel();
            panel.ControlID = this.ControlID + "_hiddenPanel";
            this.Controls.Add(panel);

            _extender = new SessionControlExtender();
            _extender.ControlID = this.ControlID;
            _extender.TargetControlID = panel.ControlID;
            _extender.SessionVariableName = SessionVariableName;
            _extender.SessionVariableValue = SessionVariableValue;
            this.Controls.Add(_extender);
            base.CreateChildControls();
        }
Esempio n. 2
0
        protected override void CreateChildControls()
        {
            if (State == ControlState.Designtime || State == ControlState.Preview)
            {
                this.Controls.Add(new Literal()
                {
                    Text = "The Session Variable Reader"
                });
            }

            InternalControls.InternalPanel panel = new InternalPanel();
            panel.ControlID = this.ControlID + "_hiddenPanel";
            this.Controls.Add(panel);

            _extender                      = new SessionControlExtender();
            _extender.ControlID            = this.ControlID;
            _extender.TargetControlID      = panel.ControlID;
            _extender.SessionVariableName  = SessionVariableName;
            _extender.SessionVariableValue = SessionVariableValue;
            this.Controls.Add(_extender);
            base.CreateChildControls();
        }