Esempio n. 1
0
        protected override void Render(HtmlTextWriter writer)
        {
            RenderBeginTag(writer);
            RenderContents(writer);
            RenderEndTag(writer);

            writer.WriteBeginTag("span");
            writer.WriteAttribute("style", "display: none;");
            writer.WriteAttribute("class", "ValidationMessage");
            writer.WriteAttribute("id", "ValidationMessage_" + ClientID);
            writer.Write(">");
            writer.WriteEndTag("span");
            if (!_valid)
            {
                writer.Write(JavaScriptManager.GetInvalidInputJS(ClientID, _validationMessage));
            }
        }
Esempio n. 2
0
        protected override void Render(HtmlTextWriter writer)
        {
            RenderBeginTag(writer);
            if (this.TextMode == TextBoxMode.MultiLine)
            {
                HttpUtility.HtmlEncode(this.Text, writer);
            }

            base.RenderEndTag(writer);

            writer.WriteBeginTag("span");
            writer.WriteAttribute("style", "display: none;");
            writer.WriteAttribute("class", "ValidationMessage");
            writer.WriteAttribute("id", "ValidationMessage_" + ClientID);
            writer.Write(">");
            writer.WriteEndTag("span");
            if (!_valid)
            {
                writer.Write(JavaScriptManager.GetInvalidInputJS(ClientID, _validationMessage));
            }
        }