/// <summary> /// Renders the opening HTML tag of the control into the specified <paramref name="writer"/>. /// </summary> /// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param> public override void RenderBeginTag(HtmlTextWriter writer) { ControlHelper.EnsureCssClassPresent(this, "form-control"); InputSizesHelper.EnsureSizeClassPresent(this, this.InputSize, "input-"); if (!String.IsNullOrEmpty(this.PlaceholderText)) { writer.AddAttribute("placeholder", PlaceholderText); } base.RenderBeginTag(writer); }
/// <summary> /// Renders the control to the specified HTML writer. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> protected override void Render(System.Web.UI.HtmlTextWriter writer) { ControlHelper.EnsureCssClassPresent(this, "form-group"); InputSizesHelper.EnsureSizeClassPresent(this, this.InputSize, "form-group-"); base.Render(writer); }