public override void RenderEndTag(System.Web.UI.HtmlTextWriter writer) { writer.RenderEndTag(); // DIV-Content writer.RenderEndTag(); // TD writer.AddAttribute(HtmlTextWriterAttribute.Class, "r"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.AddAttribute(HtmlTextWriterAttribute.Class, "s"); writer.RenderBeginTag(HtmlTextWriterTag.Span); writer.RenderEndTag(); writer.RenderEndTag(); // td writer.RenderEndTag(); // tr writer.Write(writer.NewLine); writer.AddAttribute(HtmlTextWriterAttribute.Class, "bottom"); writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.AddAttribute(HtmlTextWriterAttribute.Class, "l"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "c"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "r"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.RenderEndTag(); writer.RenderEndTag(); // tr writer.Write(writer.NewLine); writer.RenderEndTag(); // table writer.RenderEndTag(); // div writer.EndRender(); }
protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.BeginRender(); try { //bool toggled = this.Toggled; // Write the anchor start. This will make these images be an actionable object. writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID); writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID); writer.AddAttribute(HtmlTextWriterAttribute.Href, this.Page.ClientScript.GetPostBackClientHyperlink(this, "", true)); if (this.StyleTheme != ButtonStyleTheme.Custom) writer.AddAttribute(HtmlTextWriterAttribute.Class, "rsButton " + this.StyleTheme.ToString().ToLower() + " " + this.ColorTheme.ToString().ToLower() + (this.Enabled ? " active" : " disabled")); else if (!string.IsNullOrEmpty(this.CssClass)) writer.AddAttribute(HtmlTextWriterAttribute.Class, this.CssClass); if (Enabled) writer.AddAttribute("Enabled","false"); writer.RenderBeginTag(HtmlTextWriterTag.A); // Write the "outer" span. This will be the left edge of the button. if (this.ControlStyleCreated) { if (this.ControlStyle.Font.Italic) writer.AddStyleAttribute(HtmlTextWriterStyle.FontStyle, "oblique"); if (this.ControlStyle.Font.Size != FontUnit.Empty) writer.AddStyleAttribute(HtmlTextWriterStyle.FontSize, this.ControlStyle.Font.Size.ToString()); if (this.ControlStyle.Font.Names.Length > 0) writer.AddStyleAttribute(HtmlTextWriterStyle.FontFamily, string.Join(", ", this.ControlStyle.Font.Names)); } writer.AddAttribute(HtmlTextWriterAttribute.Class, "lOuter"); writer.RenderBeginTag("span"); // Write the "inner-outer" span. This will be the right edge of the button. writer.AddAttribute(HtmlTextWriterAttribute.Class, "rOuter"); writer.RenderBeginTag("span"); // Write the "inner" span. This will be the center of the button and contain the text. if (this.Width != null && this.Width != Unit.Empty) writer.AddStyleAttribute(HtmlTextWriterStyle.Width, this.Width.ToString()); writer.AddAttribute(HtmlTextWriterAttribute.Class, "inner"); writer.RenderBeginTag("span"); if (this.ControlStyleCreated) { if (this.ControlStyle.Font.Bold) writer.AddStyleAttribute(HtmlTextWriterStyle.FontWeight, "bold"); else if (this.ControlStyle.ForeColor != System.Drawing.Color.Transparent) writer.AddStyleAttribute(HtmlTextWriterStyle.Color, Hex.GetWebColor(this.ControlStyle.ForeColor)); if (this.ControlStyle.Font.Strikeout) writer.AddStyleAttribute(HtmlTextWriterStyle.TextDecoration, "strikeout"); if (this.ControlStyle.Font.Underline) writer.AddStyleAttribute(HtmlTextWriterStyle.TextDecoration, "underline"); } if (this.TextVerticalOffset != Unit.Empty) writer.AddStyleAttribute(HtmlTextWriterStyle.MarginTop, this.TextVerticalOffset.ToString()); writer.RenderBeginTag("span"); writer.WriteEncodedText(this.Text); writer.RenderEndTag(); // SPAN_text writer.RenderEndTag(); // SPAN_inner writer.RenderEndTag(); // SPAN_inner-outer writer.RenderEndTag(); // SPAN_outer writer.RenderEndTag(); // A } finally { // Make sure we "end" the rendering, no matter what. writer.EndRender(); } // These are not the droids you're looking for... //base.Render(writer); }
private static void EndForm(System.Web.UI.HtmlTextWriter writer) { writer.EndRender(); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderEndTag(); writer.Flush(); }