Base Class

Base Class

Base Class C# Web Control Code

Sitecore.Data.Items.Item item = this.GetItem();
if (item == null) return;

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("{0}", "C# Web Control Real-time Output");
output.RenderEndTag();

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-size:x-small; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);
//using : for colon and ? for question mark and   for space
output.Write("{0}: {1}", "Item", item.DisplayName);
output.RenderEndTag(); //P

output.Write("{0}&#58;&#160;{1}", "Type Name", "<b>" + this.GetType().Name + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Namespace", "<b>" + this.GetType().Namespace + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Full Name", "<b>" + this.GetType().FullName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Assembly", "<b>" + this.GetType().Assembly.FullName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Module", "<b>" + this.GetType().Name + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Base Class", "<b>" + this.GetType().BaseType.FullName + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Grandparent Base", "<b>" + this.GetType().BaseType.BaseType.FullName + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Base Is Abstract", "<b>" + this.GetType().BaseType.IsAbstract.ToString() + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Grandparent is Abstract", "<b>" + this.GetType().BaseType.BaseType.IsAbstract.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Public", "<b>" + this.GetType().IsPublic.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Sealed", "<b>" + this.GetType().IsSealed.ToString() + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Is Serializable", "<b>" + this.GetType().IsSerializable.ToString() + "</b>");

output.RenderEndTag(); //Div


Base Class C# Web Control Output

Type Name: BaseClass
Namespace: TIC66.layouts.TIC.DemoWebControls
Full Name: TIC66.layouts.TIC.DemoWebControls.BaseClass
Assembly: TIC66, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Module: BaseClass
Base Class: Sitecore.Web.UI.WebControl
Grandparent Base: System.Web.UI.WebControls.WebControl
Base Is Abstract? True
Grandparent is Abstract: False
Is Public? True
Is Sealed? False
Is Serializable? False