/// protected override void Render(System.Web.UI.HtmlTextWriter writer) { string pwdText = string.Empty; if(Filled) pwdText = " "; base.AddAttributesToRender(writer); writer.RenderBeginTag(HtmlTextWriterTag.Div); //Password Line PasswordLineStyle.AddAttributesToRender(writer); writer.RenderBeginTag(HtmlTextWriterTag.Div); PasswordLabelStyle.AddAttributesToRender(writer); writer.AddAttribute(HtmlTextWriterAttribute.For, ClientID + "_pwd"); writer.RenderBeginTag(HtmlTextWriterTag.Label); writer.WriteEncodedText(PasswordLabel); writer.RenderEndTag(); PasswordBoxStyle.AddAttributesToRender(writer); writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_pwd"); writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID + "_pwd"); writer.AddAttribute(HtmlTextWriterAttribute.Type, "password"); writer.AddAttribute(HtmlTextWriterAttribute.Value, pwdText); writer.AddAttribute(HtmlTextWriterAttribute.Onchange, "ESW_Password_Valid( " + ClientID + " );"); writer.RenderBeginTag(HtmlTextWriterTag.Input); writer.RenderEndTag(); writer.RenderEndTag(); //Confirm Line ConfirmLineStyle.AddAttributesToRender(writer); writer.RenderBeginTag(HtmlTextWriterTag.Div); ConfirmLabelStyle.AddAttributesToRender(writer); writer.AddAttribute(HtmlTextWriterAttribute.For, ClientID + "_conf"); writer.RenderBeginTag(HtmlTextWriterTag.Label); writer.WriteEncodedText(ConfirmLabel); writer.RenderEndTag(); ConfirmBoxStyle.AddAttributesToRender(writer); writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_conf"); writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID + "_conf"); writer.AddAttribute(HtmlTextWriterAttribute.Type, "password"); writer.AddAttribute(HtmlTextWriterAttribute.Value, pwdText); writer.AddAttribute(HtmlTextWriterAttribute.Onchange, "ESW_Password_Valid( " + ClientID + " );"); writer.RenderBeginTag(HtmlTextWriterTag.Input); writer.RenderEndTag(); writer.RenderEndTag(); //Error Line ErrorStyle.AddAttributesToRender(writer); if(IsValid) { if(ErrorDisplay == ValidatorDisplay.Static) writer.AddStyleAttribute(HtmlTextWriterStyle.Visibility, "hidden"); else writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none"); } writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID + "_err"); writer.RenderBeginTag(HtmlTextWriterTag.Span); writer.WriteEncodedText(ErrorMessage); writer.RenderEndTag(); writer.RenderEndTag(); }
public override void WriteTo(System.Web.UI.HtmlTextWriter writer) { if (!IsEmpty) writer.WriteEncodedText(this.Text); }
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); }