Example #1
0
        public virtual void Render(WmlTextWriter writer)
        {
            LiteralMode mode = Control.Mode;

            if (mode == LiteralMode.PassThrough || mode == LiteralMode.Encode)
            {
                Style emptyStyle = new Style();
                writer.BeginRender();
                writer.EnterStyle(emptyStyle); // VSWhidbey 114083

                if (mode == LiteralMode.PassThrough)
                {
                    writer.Write(Control.Text);
                }
                else /* mode == LiteralMode.Encode */
                {
                    writer.WriteEncodedText(Control.Text);
                }

                writer.ExitStyle(emptyStyle);
                writer.EndRender();
                return;
            }

            /* mode == LiteralMode.Transform */
            ((WmlPageAdapter)PageAdapter).RenderTransformedText(writer, Control.Text);
        }
Example #2
0
 protected override void LoadControlState(object savedState)
 {
     object[] values = (object[])savedState;
     base.LoadControlState(values[0]);
     _mode = (LiteralMode)values[1];
 }