Exemplo n.º 1
1
        protected override void Render(HtmlTextWriter writer)
        {
            Button button = this.Control;

            writer.WriteBeginTag("button"); // <button 
            writer.WriteAttribute("value", "submit"); // <button value="submit" 
            writer.WriteAttribute("id", button.ClientID); // <button value="submit" id="btnButton"

            PostBackOptions myPostBackOptions = new PostBackOptions(button);
            //Add the Postback event
            if (button.Page.ClientScript.GetPostBackEventReference(myPostBackOptions).Length > 0)
            {
                //Turn on Validation if it needs to be on...
                if (button.CausesValidation)
                    myPostBackOptions.PerformValidation = true;

                //Need to replace double quotes with single quotes for javascript to work.
                writer.WriteAttribute("onclick", button.Page.ClientScript.GetPostBackEventReference(myPostBackOptions).Replace("\"", "'")); // <button value="submit" 

                //Register the Event
                button.Page.ClientScript.RegisterForEventValidation(myPostBackOptions);
            } // <button value="submit" id="btnButton" onclick="__doPostBack('btnButton','')"

            if (button.CssClass.Length > 0)
                writer.WriteAttribute("class", button.CssClass); // <button value="submit" id="btnButton" onclick="__doPostBack('btnButton','')" class="large-button"

            writer.Write(HtmlTextWriter.TagRightChar); // <button value="submit" id="btnButton" onclick="__doPostBack('btnButton','')" class="large-button">
            writer.WriteFullBeginTag("span");
            writer.Write(button.Text);
            writer.WriteEndTag("span"); // <button value="submit" id="btnButton" onclick="__doPostBack('btnButton','')" class="large-button"><span>testButton</span>
            writer.WriteEndTag("button"); // <button value="submit" id="btnButton" onclick="__doPostBack('btnButton','')" class="large-button"><span>testButton</span></button>
        }
Exemplo n.º 2
0
        /// <summary>
        /// The RenderAttributes method adds the attributes to the rendered &lt;form&gt; tag.
        /// We override this method so that the action attribute is not emitted.
        /// </summary>
        protected override void RenderAttributes(HtmlTextWriter writer)
        {
            // write the form's name
            writer.WriteAttribute("name", this.Name);
            base.Attributes.Remove("name");

            // write the form's method
            writer.WriteAttribute("method", this.Method);
            base.Attributes.Remove("method");

            this.Attributes.Render(writer);

            // remove the action attribute
            String action = Context.Request.RawUrl;
            if (action != null)
            {
                writer.WriteAttribute("action", action);
            }

            base.Attributes.Remove("action");

            // finally write all other attributes
            this.Attributes.Render(writer);

            if (base.ID != null)
                writer.WriteAttribute("id", base.ClientID);
        }
		protected override void RenderAttributes (HtmlTextWriter writer)
		{
			if (Page != null && CausesValidation) {
				string type = Type;
				if (String.Compare (type, "button", true) == 0 || String.Compare (type, "submit", true) == 0) {
					string script = Page.ClientScript.GetPostBackClientEvent (this, String.Empty);
					if (script != null && 
						((String.Compare (type, "button", true) == 0  && Events[EventServerClick] != null )|| 
						 (String.Compare (type, "submit", true) == 0 && Page.Validators.Count > 0))){
						AttributeCollection coll = Attributes;
						if (coll ["language"] != null)
							coll.Remove ("language");
						writer.WriteAttribute ("language", "javascript");

						string onclick;
						if ((onclick = coll ["onclick"]) != null) {
							script = onclick + " " + script;
							coll.Remove ("onclick");
						}
						
						writer.WriteAttribute ("onclick", script);
					}
				}
			}
			
			base.RenderAttributes (writer);
		}
Exemplo n.º 4
0
 protected override void Render(HtmlTextWriter writer)
 {
     writer.WriteBeginTag("paper-button");
     writer.WriteAttribute("ID", this.ID);
     if (ButtonType == PaperButtonType.NoInk)
     {
         writer.Write(HtmlTextWriter.SpaceChar);
         writer.Write("noink");
     }
     else if (ButtonType == PaperButtonType.Raised)
     {
         writer.Write(HtmlTextWriter.SpaceChar);
         writer.Write("raised");
     }
     else if (ButtonType == PaperButtonType.Toggles)
     {
         writer.Write(HtmlTextWriter.SpaceChar);
         writer.Write("toggles");
     }
     if (!string.IsNullOrWhiteSpace(CssClass))
     {
         writer.WriteAttribute("class", CssClass);
     }
     writer.Write(HtmlTextWriter.TagRightChar);
     if (Icon != null)
     {
         writer.Write(Icon.ToString());
     }
     if (!string.IsNullOrWhiteSpace(Text))
     {
         writer.Write(Text);
     }
     writer.WriteEndTag("paper-button");
 }
Exemplo n.º 5
0
 public override void RenderBeginTag(HtmlTextWriter writer)
 {
     writer.WriteBeginTag("div");
     writer.WriteAttribute("id", this.UniqueID);
     if (this.CssClass != string.Empty) writer.WriteAttribute("class", this.CssClass);
     writer.Write(HtmlTextWriter.TagRightChar);
 }
        protected override void RenderContents(HtmlTextWriter writer)
        {
            if (Extender.AdapterEnabled)
            {
                LinkButton linkButton = Control as LinkButton;
                if (linkButton != null)
                {
                    string className = (!String.IsNullOrEmpty(linkButton.CssClass)) ? (linkButton.CssClass) : "AspNet-LinkButton";

                    Control ctl = linkButton.FindControl("ctl00");
                    if (ctl != null)
                    {
                        writer.WriteBeginTag("a");
                        writer.WriteAttribute("id", linkButton.ClientID);
                        writer.WriteAttribute("title", linkButton.ToolTip);
                        writer.WriteAttribute("class", className);
                        writer.WriteAttribute("href", Page.ClientScript.GetPostBackClientHyperlink(linkButton, ""));
                        writer.Write(HtmlTextWriter.TagRightChar);
                        writer.WriteBeginTag("span");
                        writer.WriteAttribute("class", "AspNet-LinkButton-Text");
                        writer.Write(HtmlTextWriter.TagRightChar);
                        writer.Write(linkButton.Text);
                        writer.WriteEndTag("span");
                        writer.WriteEndTag("a"); Page.ClientScript.RegisterForEventValidation(linkButton.UniqueID);
                    }
                    else
                    {
                        base.RenderContents(writer);
                    }
                }
            }
        }
Exemplo n.º 7
0
		public void WriteOnClickAttribute(HtmlTextWriter writer, HtmlControl control, bool submitsAutomatically, bool submitsProgramatically, bool causesValidation, string validationGroup) {
			var attributes = control.Attributes;
			string clientValidateEvent = null;
			if(submitsAutomatically) {
				if(causesValidation) {
					clientValidateEvent = GetClientValidateEvent(validationGroup);
				}
				control.Page.ClientScript.RegisterForEventValidation(control.UniqueID);
			} else if(submitsProgramatically) {
				if(causesValidation) {
					clientValidateEvent = GetClientValidatedPostback(control, validationGroup);
				} else {
					clientValidateEvent = control.Page.ClientScript.GetPostBackEventReference(control, string.Empty, true);
				}
			} else {
				control.Page.ClientScript.RegisterForEventValidation(control.UniqueID);
			}
			if(clientValidateEvent != null) {
				if(attributes["language"] != null) {
					attributes.Remove("language");
				}
				writer.WriteAttribute("language", "javascript");
				var onClick = attributes["onclick"];
				if(onClick != null) {
					attributes.Remove("onclick");
					writer.WriteAttribute("onclick", string.Format("{0} {1}", onClick, clientValidateEvent));
				} else {
					writer.WriteAttribute("onclick", clientValidateEvent);
				}
			}
		}
Exemplo n.º 8
0
 private void RenderMetaTag(HtmlTextWriter writer, string name, string content)
 {
     writer.WriteBeginTag("meta");
     writer.WriteAttribute("name",name,true);
     writer.WriteAttribute("content",content,true);
     writer.WriteLine(HtmlTextWriter.SelfClosingTagEnd);
 }
Exemplo n.º 9
0
        protected override void RenderAttributes(HtmlTextWriter writer)
        {
            base.RenderAttributes(writer);
            if (!string.IsNullOrEmpty(ID))
                writer.WriteAttribute("id", this.ClientID);
            if (this.CssClass.Length > 0)
				writer.WriteAttribute("class", this.CssClass + (this.Disabled ? " disabled" : string.Empty));
        }
Exemplo n.º 10
0
		private void RenderBlank (HtmlTextWriter writer)
		{
			writer.WriteBeginTag ("td");
			writer.WriteAttribute ("bgcolor", TabBackColor);
			writer.WriteAttribute ("width", BlankWidth.ToString ());
			writer.Write (">");
			writer.Write ("&nbsp;");
			writer.WriteEndTag ("td");
		}
		protected override void Render(HtmlTextWriter writer)
		{
			writer.WriteBeginTag("script");
			writer.WriteAttribute("type", "text/javascript");
			writer.WriteAttribute("src", url + "?" + JavaScripts);
			writer.Write(HtmlTextWriter.TagRightChar);
			writer.WriteEndTag("script");
			writer.WriteLine();
		}
 private void DoRender(HtmlTextWriter writer)
 {
     writer.WriteBeginTag("iframe");
     writer.WriteAttribute("src", SiteUtils.GetNavigationSiteRoot() + "/Services/SessionKeepAlive.aspx");
     writer.WriteAttribute("frameborder", "0");
     writer.WriteAttribute("width", "0");
     writer.WriteAttribute("height", "0");
     writer.Write(HtmlTextWriter.TagRightChar);
     writer.WriteEndTag("iframe");
 }
        /// <summary>
        /// Creates a simplistic Property Grid to display of an object
        /// </summary>
        /// <returns></returns>
        public static string ShowPropertyGrid(object sourceObject)
        {
            if (sourceObject == null)
                return "<hr/>No object passed.<hr/>";

            StringBuilder sb = new StringBuilder();
            using (StringWriter sw = new StringWriter(sb))
            {
                using (HtmlTextWriter hWriter = new HtmlTextWriter(sw))
                {
                    hWriter.WriteBeginTag("table");
                    hWriter.WriteAttribute("border", "1");
                    hWriter.WriteAttribute("cellpadding", "5");
                    hWriter.WriteAttribute("class", "table table-bordered table-striped");
                    hWriter.Write(" style='border-collapse:collapse;'");
                    hWriter.Write(HtmlTextWriter.TagRightChar);
                    MemberInfo[] miT = sourceObject.GetType().FindMembers(MemberTypes.Field | MemberTypes.Property, BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly, null, null);
                    foreach (MemberInfo Field in miT)
                    {
                        string Name = Field.Name;
                        object Value = null;
                        if (Field.MemberType == MemberTypes.Field)
                        {
                            Value = ((FieldInfo)Field).GetValue(sourceObject);
                            continue;
                        }
                        else
                            if (Field.MemberType == MemberTypes.Property)
                                Value = ((PropertyInfo)Field).GetValue(sourceObject, null);
                        hWriter.WriteFullBeginTag("tr");
                        hWriter.WriteFullBeginTag("td");
                        hWriter.Write(Name);
                        hWriter.WriteEndTag("td");
                        hWriter.WriteLine();
                        hWriter.WriteFullBeginTag("td");
                        hWriter.WriteBeginTag("input");
                        hWriter.WriteAttribute("name", "Configuration." + Name);
                        hWriter.WriteAttribute("value", ReflectionUtils.TypedValueToString(Value));
                        hWriter.Write(" style='Width:400px' ");
                        hWriter.Write(HtmlTextWriter.TagRightChar);
                        hWriter.WriteEndTag("td");
                        hWriter.WriteLine();
                        hWriter.WriteEndTag("tr");
                        hWriter.WriteLine();
                    }
                    hWriter.WriteEndTag("table");
                    //string TableResult = sb.ToString();
                    hWriter.Close();
                }
                sw.Close();
            }

            return sb.ToString();
        }
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     writer.WriteBeginTag("li");
     writer.WriteAttribute("class", this.CssClass);
     if (!String.IsNullOrEmpty(this.LiLeftMargin))
     {
         writer.WriteAttribute("style", "padding-left: 35px;  background-color: #FBFBFB;  background-image: none;border-top-style:none; text-transform: capitalize;");
     }
     writer.Write(HtmlTextWriter.TagRightChar);
     this.HyperLink.RenderControl(writer);
     writer.WriteEndTag("li");
 }
Exemplo n.º 15
0
        protected override void RenderAttributes(HtmlTextWriter writer)
        {
            base.RenderAttributes(writer);

            if (this.Href != null)
            {
                writer.WriteAttribute("href", this.Href);
            }

            writer.WriteAttribute("type", "text/css");
            writer.WriteAttribute("rel", "stylesheet");
        }
Exemplo n.º 16
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            if (this.DesignMode)
            {
                base.Render(writer);
            }
            else
            {
                //TOPMOST DIV
                writer.WriteBeginTag("div");
                writer.WriteAttribute("id", this.ClientID);
                if (!string.IsNullOrEmpty(CssClass))
                {
                    writer.WriteAttribute("class", this.CssClass);
                }
                foreach (string key in this.Style.Keys)
                {
                    writer.WriteStyleAttribute(key, this.Style[key]);
                }
                foreach (string key in this.Attributes.Keys)
                {
                    if (!string.IsNullOrEmpty(this.Attributes[key]))
                    {
                        writer.WriteAttribute(key, this.Attributes[key]);
                    }
                }
                writer.Write(HtmlTextWriter.TagRightChar);
                writer.Indent++;
                writer.WriteLine();

                //DIV

                writer.WriteBeginTag("ul");
                writer.WriteAttribute("class", "StaticMenuStyle");
                writer.Write(HtmlTextWriter.TagRightChar);
                writer.Indent++;
                writer.WriteLine();

                BuildItems(writer, this.Items);

                writer.Indent--;
                writer.WriteEndTag("ul");
                writer.WriteLine();


                //END DIV
                writer.Indent--;
                writer.WriteEndTag("div");
                writer.WriteLine();
            }
        }
Exemplo n.º 17
0
        protected override void Render(HtmlTextWriter writer)
        {
            int rowCount = 0;
            writer.WriteBeginTag("table");
            writer.WriteAttribute("id", this.ClientID);
            writer.WriteAttribute("class", this.CssClass);
            writer.WriteAttribute("summary", this.TableSummary);
            writer.Write(HtmlTextWriter.TagRightChar);

            foreach (RepeaterItem ri in Items)
            {
                if (rowCount == 0)
                {
                    writer.WriteBeginTag("tr");
                    writer.Write(HtmlTextWriter.TagRightChar);
                }

                writer.WriteBeginTag("td");
                writer.Write(HtmlTextWriter.TagRightChar);
                ri.RenderControl(writer);
                writer.WriteEndTag("td");

                if (rowCount == this.ColumnCount - 1)
                {
                    writer.WriteEndTag("tr");
                    rowCount = 0;
                }
                else
                {
                    rowCount++;
                }
            }

            if (rowCount > 0)
            {
                //write any remaining td's
                while (rowCount < this.ColumnCount)
                {
                    writer.WriteBeginTag("td");
                    writer.Write(HtmlTextWriter.TagRightChar);
                    writer.Write("&nbsp;");
                    writer.WriteEndTag("td");
                    rowCount++;
                }

                writer.WriteEndTag("tr");
                //writer.cl
            }

            writer.WriteEndTag("table");
        }
Exemplo n.º 18
0
        protected override void Render(HtmlTextWriter writer)
        {
            if (!ImageControl.Height.IsEmpty || !ImageControl.Width.IsEmpty)
            {
                string thumbnailUrl = GetResizedImageUrl(ImageControl.ImageUrl, ImageControl.Width.Value, ImageControl.Height.Value);

                writer.WriteBeginTag("img");
                writer.WriteAttribute("alt", ImageControl.AlternateText);
                writer.WriteAttribute("src", thumbnailUrl);
                writer.WriteEndTag("img");
            }
            else if (ImageControl.ImageUrl.Length > 0)
                base.Render(writer);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Override render and spit out the element indicated in Tag.  Any additional attributes applied to this control will also be applied
        /// to the element which is produced, so you can easily use pico:content ALMOST as a regular html tag or replace existing tags with it.
        /// Not 100% simple, BUT EASIER AND SIMPLER than writing an HttpModule which attempts to scrape outgoing html and inject content and also
        /// simpler and more efficient (and search-friendly) than using ajax on the client-side to inject content.
        /// </summary>
        /// <param name="writer"></param>
        protected override void Render(HtmlTextWriter writer)
        {
            writer.WriteBeginTag(Tag);
            writer.WriteAttribute("contentregion", Key);
            foreach (string attr in this.Attributes.Keys)
                writer.WriteAttribute(attr, this.Attributes[attr]);

            writer.Write(">");

            string content = GetContent(Key);
            writer.Write(content);

            writer.WriteEndTag(Tag);
        }
Exemplo n.º 20
0
        protected override void Render(HtmlTextWriter output)
        {
            //begin writing table
            output.WriteBeginTag("table");
            output.WriteAttribute("cellpadding", "0");
            output.WriteAttribute("cellspacing", "0");

            output.Write(HtmlTextWriter.TagRightChar);

            //begin writing row
            output.WriteBeginTag("tr");
            output.Write(HtmlTextWriter.TagRightChar);

            //write first column
            output.WriteBeginTag("td");

            string style = "width: " + CaptionWidth.ToString() + ";";

            if (RightAlignCaption)
                style += "text-align: right;";

            output.WriteAttribute("Style", style);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(Caption);
            output.WriteEndTag("td");

            //write second column
            output.WriteBeginTag("td");

            style = "width: " + CaptionPadding.ToString() + ";";

            output.WriteAttribute("Style", style);

            output.Write(HtmlTextWriter.TagRightChar);
            output.WriteEndTag("td");

            //write third column
            output.WriteBeginTag("td");
            output.Write(HtmlTextWriter.TagRightChar);

            base.Render(output);    // this renders the TextBox

            output.WriteEndTag("td");

            //finish writing row
            output.WriteEndTag("tr");

            //finish writing table
            output.WriteEndTag("table");
        }
Exemplo n.º 21
0
 protected override void Render(HtmlTextWriter writer)
 {
     writer.WriteBeginTag("object");
     writer.WriteAttribute("type", "application/x-shockwave-flash");
     writer.WriteAttribute("style", "width:425px; height:350px;");
     writer.WriteAttribute("data=", this._videoID);
     writer.Write('>');
     writer.WriteBeginTag("param");
     writer.WriteAttribute("name", "movie");
     writer.WriteAttribute("value", this._videoID);
     writer.Write(" />");
     writer.WriteEndTag("object");
     base.Render(writer);
 }
Exemplo n.º 22
0
        /// <exclude />
        protected override void Render(HtmlTextWriter writer)
        {
            writer.WriteBeginTag("ui:treenode");

            writer.WriteAttribute("label", StringResourceSystemFacade.ParseString(this.Text));

            writer.WriteAttribute("id", this.ClientID);

            // bool checksumAttrRequired = false;

            if(!Focused)
            {
                writer.WriteAttribute("callbackid", this.ClientID);
            }

            if (!string.IsNullOrEmpty(this.ImageUrl))
            {
                writer.WriteAttribute("image", this.ImageUrl);
            }

            if(this.Focused)
            {
                // checksumAttrRequired = true;
                writer.WriteAttribute("focused", "true");
            }

            //if(checksumAttrRequired)
            //{
            //    writer.WriteAttribute("checksum", DateTime.Now.Ticks.ToString());
            //}

            //if (this.Focused)
            //{
            //    writer.WriteAttribute("focused", "true");
            //    if (string.IsNullOrEmpty(this.OnClientClick) == false)
            //    {
            //        writer.WriteAttribute("onbindingfocus", this.OnClientClick);
            //    }
            //}
            //else
            //{
            //    string clientScripting = string.Format("this.dispatchAction(PageBinding.ACTION_DOPOSTBACK);{0}", this.OnClientClick);
            //    writer.WriteAttribute("onbindingfocus", clientScripting);
            //}

            this.WriteClientAttributes(writer);

            writer.Write( HtmlTextWriter.SelfClosingTagEnd );
        }
Exemplo n.º 23
0
 protected override void Render(HtmlTextWriter writer)
 {
     writer.WriteBeginTag("paper-input");
     writer.WriteAttribute("ID", this.ID);
     if (!string.IsNullOrWhiteSpace(PlaceHolderText))
     {
         writer.WriteAttribute("label", PlaceHolderText);
     }
     if (!string.IsNullOrWhiteSpace(ErrorMessage))
     {
         writer.WriteAttribute("error-message", ErrorMessage);
     }
     writer.Write(HtmlTextWriter.TagRightChar);
     writer.WriteEndTag("paper-input");
 }
Exemplo n.º 24
0
 protected override void Render(HtmlTextWriter writer)
 {
     RenderBeginTag(writer);
     foreach (ListItem li in this.Items)
     {
         writer.WriteBeginTag("option");
         writer.WriteAttribute("value", li.Value);
         if (li.Selected)
             writer.WriteAttribute("selected", "");
         writer.Write(HtmlTextWriter.TagRightChar);
         writer.Write(li.Text.Replace(" ", "&nbsp;"));
         writer.WriteEndTag("option");
     }
     RenderEndTag(writer);
 }
Exemplo n.º 25
0
        protected override void RenderAttributes(HtmlTextWriter writer)
        {
            writer.WriteAttribute("name", this.Name);
            base.Attributes.Remove("name");

            writer.WriteAttribute("method", this.Method);
            base.Attributes.Remove("method");

            this.Attributes.Render(writer);

            base.Attributes.Remove("action");

            if (base.ID != null)
                writer.WriteAttribute("id", base.ClientID);
        }
Exemplo n.º 26
0
 private void RenderOptionGroupBeginTag(string name, HtmlTextWriter writer)
 {
     writer.WriteBeginTag("optgroup");
     writer.WriteAttribute("label", name);
     writer.Write(HtmlTextWriter.TagRightChar);
     writer.WriteLine();
 }
Exemplo n.º 27
0
        /// <summary>
        /// 呈现OptionGroup的BeginTag
        /// </summary>
        /// <param name="li">OptionGroup数据项</param>
        /// <param name="writer">writer</param>
        private void OptionGroupBeginTag(ListItem li, HtmlTextWriter writer)
        {
            writer.WriteBeginTag("optgroup");

            // 写入OptionGroup的label
            writer.WriteAttribute("label", li.Text);

            foreach (string key in li.Attributes.Keys)
            {
                // 写入OptionGroup的其它属性
                writer.WriteAttribute(key, li.Attributes[key]);
            }

            writer.Write(HtmlTextWriter.TagRightChar);
            writer.WriteLine();
        }
Exemplo n.º 28
0
		private void BuildItems(TreeNodeCollection items, bool isRoot, bool isExpanded, HtmlTextWriter writer)
		{
			if (items.Count > 0)
			{
				writer.WriteLine();

				writer.WriteBeginTag("ul");

				if (isRoot)
				{
					writer.WriteAttribute("id", this.ClientID);
				}
				writer.Write(HtmlTextWriter.TagRightChar);
				writer.Indent++;

				foreach (System.Web.UI.WebControls.TreeNode item in items)
				{
					BuildItem(item, writer);
				}

				writer.Indent--;
				writer.WriteLine();
				writer.WriteEndTag("ul");
			}
		}
Exemplo n.º 29
0
		private void BuildItem(System.Web.UI.WebControls.TreeNode item, HtmlTextWriter writer)
		{
			TreeView treeView = this;
			if ((treeView != null) && (item != null) && (writer != null))
			{
				writer.WriteLine();
				writer.WriteBeginTag("li");
				if (item.Selected || IsChildNodeSelected(item.ChildNodes))
					writer.WriteAttribute("class", "open");
				writer.Write(HtmlTextWriter.TagRightChar);
				writer.Indent++;
				writer.WriteLine();
				
				if (!string.IsNullOrEmpty(item.NavigateUrl))
				{
					WriteNodeLink(treeView, item, writer);
				}
				else
				{
					WriteNodePlain(treeView, item, writer);
				}

				if (HasChildren(item))
				{
					BuildItems(item.ChildNodes, false, item.Expanded.Equals(true), writer);
				}

				writer.Indent--;
				writer.WriteLine();
				writer.WriteEndTag("li");
			}
		}
        public static void WriteFooter(HtmlTextWriter wrtr, Type type,
            bool autoDocVersion)
        {
            wrtr.WriteBeginTag("div");
              wrtr.WriteAttribute("id", "content");
              wrtr.Write(HtmlTextWriter.TagRightChar);
              wrtr.WriteLine();

              wrtr.WriteFullBeginTag("h2");
              wrtr.Write("&nbsp;");
              wrtr.WriteEndTag("h2");
              wrtr.WriteLine();

              if (autoDocVersion)
              {
            AssemblyName name1 = type.Assembly.GetName();
            wrtr.Write("{0} {1}.{2}.{3}&nbsp;&nbsp;&nbsp;", name1.Name,
              name1.Version.Major, name1.Version.Minor, name1.Version.Build);

            AssemblyName name2 = typeof(XmlRpcServerProtocol).Assembly.GetName();
            wrtr.Write("{0} {1}.{2}.{3}&nbsp;&nbsp;&nbsp;", name2.Name,
              name2.Version.Major, name2.Version.Minor, name2.Version.Build);

            wrtr.Write(".NET CLR {0}.{1}.{2}&nbsp;&nbsp;&nbsp;",
              Environment.Version.Major,Environment.Version.Minor,
              Environment.Version.Build);
              }
              wrtr.WriteEndTag("div");
              wrtr.WriteLine();
        }
Exemplo n.º 31
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.WriteBeginTag("div");
            writer.WriteAttribute("class", "filter range");
            writer.Write(HtmlTextWriter.TagRightChar);

            FilterHelper.RenderLabel(this, writer);

            writer.WriteBeginTag("div");
            writer.AddAttribute("class", "boxes");
            writer.Write(HtmlTextWriter.TagRightChar);

            foreach (Control c in Controls)
            {
                if (!(c is ExtenderControlBase))
                {
                    c.RenderControl(writer);
                }
            }

            writer.WriteEndTag("div");
            writer.WriteEndTag("div");

            foreach (Control c in Controls)
            {
                if ((c is ExtenderControlBase))
                {
                    c.RenderControl(writer);
                }
            }
        }
 protected override void RenderContents(HtmlTextWriter output)
 {
     output.WriteFullBeginTag("span");
     output.WriteBeginTag("img");
     output.WriteAttribute("src", WebResource("DemoControl.images.down.jpg"));
     output.WriteAttribute("onclick", "toggle(this,'toggle_" + ClientID + "')");
     output.Write("/>");
     output.Write("&nbsp;" + Title);
     output.WriteEndTag("span");
     output.Write("<br />");
     output.WriteBeginTag("span");
     output.WriteAttribute("id", "toggle_" + ClientID);
     output.WriteAttribute("style", "display:none");
     output.Write(">" + Text);
     output.WriteEndTag("span");
 }
Exemplo n.º 33
0
        protected override void RenderBeginTag(HtmlTextWriter writer)
        {
            if ((Control != null) && (Control.Attributes["CssSelectorClass"] != null) && (Control.Attributes["CssSelectorClass"].Length > 0))
            {
                writer.WriteLine();
                writer.WriteBeginTag("div");
                writer.WriteAttribute("class", Control.Attributes["CssSelectorClass"]);
                writer.Write(HtmlTextWriter.TagRightChar);
                writer.Indent++;
            }

            writer.WriteLine();
            writer.WriteBeginTag("div");
            writer.WriteAttribute("class", "AspNet-Menu-" + Control.Orientation.ToString());
            writer.Write(HtmlTextWriter.TagRightChar);
        }
Exemplo n.º 34
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     writer.WriteBeginTag("div");
     writer.WriteAttribute("class", "umbLabelButton");
     writer.Write(HtmlTextWriter.TagRightChar);
     base.Render(writer);
     caption.RenderControl(writer);
     writer.WriteEndTag("div");
 }
Exemplo n.º 35
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.WriteBeginTag("div");
            writer.WriteAttribute("class", "filter");
            writer.Write(HtmlTextWriter.TagRightChar);

            FilterHelper.RenderLabel(this, writer);
            base.Render(writer);
            writer.WriteEndTag("div");
        }
 /// <summary>
 /// Renders the <see cref="T:System.Web.UI.HtmlControls.HtmlTitle"/> control to the specified <see cref="T:System.Web.UI.HtmlTextWriter"/> object.
 /// </summary>
 /// <param name="writer">A <see cref="T:System.Web.UI.HtmlTextWriter"/> that contains the output stream to render on the client.</param>
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     writer.WriteBeginTag(this.TagName);
     foreach (string key in this.Attributes.Keys)
     {
         writer.WriteAttribute(key, this.Attributes[key]);
     }
     writer.Write(HtmlTextWriter.TagRightChar);
     this.RenderChildren(writer);
     writer.WriteEndTag(this.TagName);
 }
Exemplo n.º 37
0
        /// <summary>
        /// Overrides the RenderContents method.
        /// </summary>
        protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
        {
            Boolean oneSelected = false;

            foreach (ListItem item in this.Items)
            {
                writer.WriteBeginTag("option");
                if (item.Selected)
                {
                    if (!oneSelected)
                    {
                        writer.WriteAttribute("selected", "selected", false);
                    }
                    oneSelected = true;
                }

                writer.WriteAttribute("value", item.Value, true);
                writer.Write(">");
                HttpUtility.HtmlEncode(item.Text, writer);
                writer.WriteEndTag("option");
                writer.WriteLine();
            }
        }
Exemplo n.º 38
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            writer.WriteBeginTag("div");

            string divClass = "line";

            if (IsRequired && CanBeEnabled)
            {
                divClass += " fm-req";
            }

            writer.WriteAttribute("class", divClass);
            writer.Write(HtmlTextWriter.TagRightChar);

            RenderLabel(writer);
            if ((CanBeEnabled) || this.Type == DataFieldType.HtmlEditor)
            {
                foreach (Control c in Controls)
                {
                    if (!(c is ExtenderControlBase))
                    {
                        c.RenderControl(writer);
                    }
                }
            }
            else
            {
                RenderText(writer);
            }

            if (CanBeEnabled)
            {
                foreach (Control c in Controls)
                {
                    if ((c is ExtenderControlBase))
                    {
                        c.RenderControl(writer);
                    }
                }
            }

            writer.WriteEndTag("div");
        }
Exemplo n.º 39
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            string theStyle = String.Format("width:{0};height:{1};background-color:{2}",
                                            this.Width.ToString(), this.Height.ToString(),
                                            String.Format("#{0:x2}{0:x2}{0:x2}",
                                                          this.BackColor.R,
                                                          this.BackColor.G,
                                                          this.BackColor.B));

            writer.WriteBeginTag("table");
            writer.WriteAttribute("style", theStyle);
            writer.WriteAttribute("border", "0");
            writer.WriteAttribute("cellpadding", "0");
            writer.WriteAttribute("cellspacing", "0");
            writer.Write(HtmlTextWriter.TagRightChar);

            writer.WriteBeginTag("tr");
            writer.Write(HtmlTextWriter.TagRightChar);
            for (int i = 0; i < Tabs.Count; i++)
            {
                Tab tab = (Tab)Tabs[i];
                writer.WriteBeginTag("td");
                writer.Write(HtmlTextWriter.TagRightChar);

                if (SelectedIndexChange != null)
                {
                    writer.WriteBeginTag("a");
                    string tgt = this.ClientID;
                    writer.WriteAttribute("href", "javascript:__doPostBack('" + tgt + "','" + i.ToString() + "');");

                    foreach (string key in this.Attributes.Keys)
                    {
                        string val = (string)this.Attributes[key];
                        writer.WriteAttribute(key, val);
                    }
                    writer.Write(HtmlTextWriter.TagRightChar);

                    writer.WriteBeginTag("img");
                    writer.WriteAttribute("src", i == SelectedIndex? tab.EnabledImageUrl : tab.DisabledImageUrl);
                    writer.WriteAttribute("border", "0");
                    writer.Write(HtmlTextWriter.TagRightChar);
                    writer.WriteEndTag("a");
                }
                else
                {
                    writer.WriteBeginTag("div");
                    string tgt = this.ClientID;
                    //writer.WriteAttribute ("href", "javascript:__doPostBack('" + tgt + "','" + i.ToString() + "');");

                    foreach (string key in this.Attributes.Keys)
                    {
                        string val = (string)this.Attributes[key];
                        writer.WriteAttribute(key, val);
                    }
                    writer.Write(HtmlTextWriter.TagRightChar);

                    writer.WriteBeginTag("img");
                    writer.WriteAttribute("src", i == SelectedIndex? tab.EnabledImageUrl : tab.DisabledImageUrl);
                    writer.WriteAttribute("border", "0");
                    writer.Write(HtmlTextWriter.TagRightChar);
                    writer.WriteEndTag("div");
                }
                writer.WriteEndTag("td");
            }
            writer.WriteEndTag("tr");
            writer.WriteEndTag("table");
        }
Exemplo n.º 40
0
        public override void Render(System.Web.UI.HtmlTextWriter output)
        {
            TableGrid grid;

            if (ParentWindow is TableGrid)
            {
                grid = (TableGrid)ParentWindow;

                if (ParentWindow is DojoMemberGrid)
                {
                }
                else if (ParentWindow is DojoTestEligibilityGrid)
                {
                }
                else
                {
                    throw(new Exception("Parent window is not supported."));
                }
            }
            else
            {
                throw(new Exception("Parent window is not supported."));
            }

            DojoMember m = new DojoMember(int.Parse(grid.Page.Request.QueryString[0]));

            RenderTableBeginTag(output, "_viewPanel", grid.CellPadding, grid.CellSpacing, Unit.Percentage(100), Unit.Empty, grid.CssClass);

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("th");
            output.WriteAttribute("class", grid.HeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(m.PrivateContact.FullName);
            output.WriteEndTag("th");
            output.WriteEndTag("tr");

            #region Contact Information

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Contacts");
            if (m.PrivateContact.IsBadAddress)
            {
                output.Write(" - <strong>Bad Address</strong>");
            }
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(m.PrivateContact.ConstructAddress("<br />"));
            output.Write("<br />");
            if (m.PrivateContact.HomePhone != string.Empty)
            {
                output.Write(m.PrivateContact.HomePhone + " (h)<br />");
            }
            if (m.PrivateContact.WorkPhone != string.Empty)
            {
                output.Write(m.PrivateContact.WorkPhone + " (w)<br />");
            }
            if (m.PrivateContact.MobilePhone != string.Empty)
            {
                output.Write(m.PrivateContact.MobilePhone + " (m)<br />");
            }
            if (m.PrivateContact.Email1 != string.Empty)
            {
                output.Write("<a href=\"mailto:");
                output.Write(m.PrivateContact.Email1);
                output.Write("\">");
                output.Write(m.PrivateContact.Email1);
                output.Write("</a>");
                output.Write("<br />");
            }
            if (m.PrivateContact.ValidationMemo != null && m.PrivateContact.ValidationMemo.Length > 0)
            {
                output.Write("<br />");
                output.Write("<strong>Validation Memo : </strong><br />");
                output.Write(m.PrivateContact.ValidationMemo.Replace("\n", "<br />"));
            }
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            #endregion

            #region Membership Information

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Membership");
            if (m.IsPastDue)
            {
                output.Write(" - <strong>Past Due</strong>");
            }
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Student Type</strong> : ");
            output.Write(m.MemberType.Name);
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Membership Date</strong> : ");
            output.Write(m.MemberSince.ToLongDateString());
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Active Membership</strong> : ");
            if (m.IsPrimaryOrgActive)
            {
                output.Write("Yes");
            }
            else
            {
                output.Write("No");
            }
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Rank</strong> : ");
            output.Write(m.Rank.Name);
            output.Write(" (" + m.RankDate.ToShortDateString() + ")");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            #endregion

            #region Attendance Information

            // Pull last 90 days of attendance from the database

            int      maxEntries     = 150;
            int      displayEntries = 5;
            DateTime minSearchDate  = DateTime.Now.Subtract(TimeSpan.FromDays(90));

            DojoAttendanceEntryManager    aem        = new DojoAttendanceEntryManager();
            DojoAttendanceEntryCollection attendance =
                aem.GetCollection(maxEntries, "MemberID=" + m.ID.ToString() +
                                  " AND ClassStart>=#" + minSearchDate.ToString() + "#", "ClassStart DESC",
                                  DojoAttendanceEntryFlags.Class);

            DojoMember instructor1 = m.Instructor1;
            DojoMember instructor2 = m.Instructor2;
            DojoMember instructor3 = m.Instructor3;

            if (attendance.Count < displayEntries)
            {
                displayEntries = attendance.Count;
            }

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Attendance");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Time In Membership</strong> : ");
            output.Write(m.TimeInMembership.TotalHours.ToString("f") + " Hours");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Time In Rank</strong> : ");
            output.Write(m.TimeInRank.TotalHours.ToString("f") + " Hours");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.DefaultRowCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("<strong>Last Signin</strong> : ");
            output.Write(m.LastSignin.ToLongDateString());
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            // Top Instructor
            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Ninety Day Instructors");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            if (instructor1 != null)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write(instructor1.PrivateContact.FullName);
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }
            else
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("None");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }

            if (instructor2 != null)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write(instructor2.PrivateContact.FullName);
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }

            if (instructor3 != null)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write(instructor3.PrivateContact.FullName);
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }

            // Display Last 5 Classes
            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Ninety Day Activity");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            if (displayEntries == 0)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("None");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }
            else
            {
                for (int x = 0; x < displayEntries; x++)
                {
                    DojoAttendanceEntry entry = attendance[x];

                    output.WriteFullBeginTag("tr");
                    output.WriteBeginTag("td");
                    output.WriteAttribute("class", grid.DefaultRowCssClass);
                    output.Write(HtmlTextWriter.TagRightChar);
                    output.Write(entry.Class.Name +
                                 " - " +
                                 entry.Class.ClassStart.ToString("dddd, MMMM d - h:mm tt"));
                    output.WriteEndTag("td");
                    output.WriteEndTag("tr");
                }
            }

            #endregion

            //			#region Instructor Information
            //
            //			if(m.IsInstructor)
            //			{
            //				output.WriteFullBeginTag("tr");
            //				output.WriteBeginTag("td");
            //				output.WriteAttribute("class", grid.SubHeaderCssClass);
            //				output.Write(HtmlTextWriter.TagRightChar);
            //				output.Write("Instructor Details");
            //				output.WriteEndTag("td");
            //				output.WriteEndTag("tr");
            //			}
            //
            //			#endregion

            #region Security

            if (this.ParentWindow.Page.User.IsInRole("Tessen/Administrator"))
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.SubHeaderCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("Security");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");

                if (m.UserAccount == null)
                {
                    output.WriteFullBeginTag("tr");
                    output.WriteBeginTag("td");
                    output.WriteAttribute("class", grid.DefaultRowCssClass);
                    output.Write(HtmlTextWriter.TagRightChar);
                    output.Write("The member has no associated user account.");
                    output.WriteEndTag("td");
                    output.WriteEndTag("tr");
                }
                else
                {
                    output.WriteFullBeginTag("tr");
                    output.WriteBeginTag("td");
                    output.WriteAttribute("class", grid.DefaultRowCssClass);
                    output.Write(HtmlTextWriter.TagRightChar);
                    output.Write("<strong>Username</strong> : ");
                    output.Write(m.UserAccount.UserName);
                    output.Write("<br />");
                    output.Write("<strong>Last Access</strong> : ");
                    if (m.UserAccount.LoginDate != DateTime.MinValue)
                    {
                        output.Write(m.UserAccount.LoginDate);
                    }
                    else
                    {
                        output.Write("None");
                    }
                    output.Write("<br />");
                    output.Write("<strong>Login Count</strong> : ");
                    output.Write(m.UserAccount.LoginCount);
                    output.WriteEndTag("td");
                    output.WriteEndTag("tr");
                }
            }

            #endregion

            #region Memos

            if (this.ParentWindow.Page.User.IsInRole("Tessen/Administrator"))
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.SubHeaderCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("Current Attendance Message");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");

                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                if (m.AttendanceMessage != "")
                {
                    output.Write(m.AttendanceMessage);
                }
                else
                {
                    output.Write("Empty");
                }
                output.WriteEndTag("td");
                output.WriteEndTag("tr");

                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.SubHeaderCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("Memo");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");

                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                if (m.PrivateContact.MemoText != "")
                {
                    output.Write(m.PrivateContact.MemoText.Replace("\n", "<br>"));
                }
                else
                {
                    output.Write("Empty");
                }
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }

            #endregion

            output.WriteEndTag("table");
        }
Exemplo n.º 41
0
        public override void Render(System.Web.UI.HtmlTextWriter output)
        {
            DojoTest test;
            TestCandidateCollection candidates;
            TestListGenerator       gen;
            string    connectionString;
            TableGrid grid;

            if (ParentWindow is TableGrid)
            {
                grid = (TableGrid)ParentWindow;

                if (ParentWindow is DojoTestGrid)
                {
                    connectionString = ((DojoTestGrid)ParentWindow).ConnectionString;
                }
                else if (ParentWindow is DojoTestListGrid)
                {
                    connectionString = ((DojoTestListGrid)ParentWindow).ConnectionString;
                }
                else
                {
                    throw(new Exception("Parent window is not supported."));
                }
            }
            else
            {
                throw(new Exception("Parent window is not supported."));
            }

            test = new DojoTest(int.Parse(grid.Page.Request.QueryString[0]));

            RenderTableBeginTag(output, "_viewPanel", grid.CellPadding, grid.CellSpacing, Unit.Percentage(100), Unit.Empty, grid.CssClass);

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("th");
            output.WriteAttribute("colspan", "4");
            output.WriteAttribute("class", grid.HeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(test.Name);
            output.WriteEndTag("th");
            output.WriteEndTag("tr");

            #region Candidates Information

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("colspan", "4");
            output.WriteAttribute("class", grid.SubHeaderCssClass);
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write("Candidates");
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            if (test.ActiveTestList != null)
            {
                gen        = new TestListGenerator(connectionString);
                candidates = gen.BuildTestList(test);

                foreach (TestCandidate candidate in candidates)
                {
                    if (!candidate.IsRemoved)
                    {
                        output.WriteFullBeginTag("tr");

                        output.WriteBeginTag("td");
                        output.WriteAttribute("class", grid.DefaultRowCssClass);
                        output.Write(HtmlTextWriter.TagRightChar);
                        output.Write(candidate.Member.PrivateContact.ConstructName("L,FMi"));
                        output.WriteEndTag("td");

                        output.WriteBeginTag("td");
                        output.WriteAttribute("class", grid.DefaultRowCssClass);
                        output.Write(HtmlTextWriter.TagRightChar);
                        output.Write(candidate.Status.Name);
                        output.WriteEndTag("td");

                        output.WriteBeginTag("td");
                        output.WriteAttribute("class", grid.DefaultRowCssClass);
                        output.Write(HtmlTextWriter.TagRightChar);
                        output.Write(candidate.LastEntry.Comment);
                        output.WriteEndTag("td");

                        output.WriteBeginTag("td");
                        output.WriteAttribute("class", grid.DefaultRowCssClass);
                        output.Write(HtmlTextWriter.TagRightChar);
                        output.Write("<input type=\"submit\" name=\"" +
                                     grid.ClientID + "_remove_" + candidate.Member.ID.ToString() +
                                     "\" value=\"Remove\" />");
                        output.WriteEndTag("td");

                        output.WriteEndTag("tr");
                    }
                }
            }
            else
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("colspan", "4");
                output.WriteAttribute("class", grid.DefaultRowCssClass);
                output.Write(HtmlTextWriter.TagRightChar);
                output.Write("No active test list found.");
                output.WriteEndTag("td");
                output.WriteEndTag("tr");
            }

            #endregion

            output.WriteEndTag("table");
        }