Beispiel #1
0
        protected override void Render(HtmlTextWriter output)
        {
            if (!Page.IsPostBack)
            {
                if (_formCollection == null)
                {
                    if (HttpContext.Current.Request.Form.Count > 0)
                    {
                        _formCollection = HttpContext.Current.Request.Form;
                    }
                    else
                    {
                        _formCollection = new NameValueCollection();
                    }
                }

                var pageScripts = new NameValueCollection();

                var isAddAndNotPostBack = !_isEdit && !_isPostBack;

                var inputHtml = BackgroundInputTypeParser.ParseTextEditor(_publishmentSystemInfo, _attributeName, _formCollection, isAddAndNotPostBack, pageScripts, string.Empty, string.Empty, 0);

                output.Write(inputHtml);

                foreach (string key in pageScripts.Keys)
                {
                    output.Write(pageScripts[key]);
                }
            }
        }
Beispiel #2
0
        protected override void Render(HtmlTextWriter output)
        {
            if (Page.IsPostBack)
            {
                return;
            }

            var pageScripts = new NameValueCollection();

            var attributes = new ExtendedAttributes();

            attributes.Set(_attributeName, _value);

            var extraBuilder = new StringBuilder();
            var inputHtml    = BackgroundInputTypeParser.ParseTextEditor(attributes, _attributeName, _siteInfo, pageScripts, extraBuilder);

            output.Write(inputHtml + extraBuilder);

            foreach (string key in pageScripts.Keys)
            {
                output.Write(pageScripts[key]);
            }
        }