protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Id, "traceContainer");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            var linkToggle = new HtmlAnchor {HRef = "#", ID = "lnkToggleView", InnerText = "toggle"};
            linkToggle.RenderControl(writer);

            btnClear.RenderControl(writer);

            const string contentPlaceholder = @"<table id='traceTable'><td><b>Start</b></td><td><b>Duration</b></td><td><b>Query</b></td></table>";
            writer.Write(contentPlaceholder);

            writer.Write(GetTraceTemplate());
            writer.Write(GetTraceAsJson());
            writer.Write(GetToggleJavascript());

            writer.RenderEndTag();		// div

            base.RenderContents(writer);
        }
Пример #2
0
 protected override void RenderEndTag(HtmlTextWriter writer) {
     _menuPanel.RenderEndTag(writer);
     // skip link
     if (Control.SkipLinkText.Length != 0) {
         HtmlAnchor skipAnchor = new HtmlAnchor();
         skipAnchor.Name = Control.ClientID + "_SkipLink";
         skipAnchor.Page = Page;
         skipAnchor.RenderControl(writer);
     }
 }
Пример #3
0
        protected override void RenderContents(HtmlTextWriter output)
        {
            System.Web.UI.HtmlControls.HtmlAnchor link = new HtmlAnchor();
            link.HRef = NavigateUrl;
            link.Target = Target;

            if (!string.IsNullOrEmpty(DataField))
            {
                link.InnerText = string.Concat("{", DataField, "}");
            }
            else if (!string.IsNullOrEmpty(DataText))
            {
                link.InnerText = DataText;
            }

            if (!string.IsNullOrEmpty(HrefClass))
            {
                link.Attributes.Add("class", HrefClass);
            }

            link.RenderControl(output);
        }