Example #1
0
        /// <summary>
        /// Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> instance.
        /// </summary>
        /// <param name="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            if (CssClass.IsNotSet())
            {
                this.CssClass = DEFAULTCSSCLASS;
            }

            writer.AddAttribute("placeholder", this.placeholder);

            base.AddAttributesToRender(writer);
        }
Example #2
0
        /// <summary>
        /// Adds HTML attributes and styles that need to be rendered to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> instance.
        /// </summary>
        /// <param name="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            if (CssClass.IsNotSet())
            {
                this.CssClass = DEFAULTCSSCLASS;
            }

            writer.AddAttribute("placeholder", this.placeholder);

            InputType textMode = this.Type;

            switch (textMode)
            {
            default:
                writer.AddAttribute(HtmlTextWriterAttribute.Type, GetTypeAttributeValue(textMode));
                break;
            }

            base.AddAttributesToRender(writer);
        }