BuildMaster SDK Reference
Version:

Element Class

Represents a basic HTML element.

Syntax

public class Element : System.Web.UI.Control, System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IUrlResolutionService, System.Web.UI.IDataBindingsAccessor, System.Web.UI.IControlBuilderAccessor, System.Web.UI.IControlDesignerAccessor, System.Web.UI.IExpressionsAccessor, System.Web.UI.IAttributeAccessor, IMandatoryClientIdPolicyContainer, ISimpleControl, ISimpleControlContainer, ISimpleClientResourceConsumer

Constructors

Name Description
Element(string elementType)

Initializes a new instance of the Element class.

Element(string elementType, object content)

Initializes a new instance of the Element class.

Element(string elementType, object[] content)

Initializes a new instance of the Element class.

Properties

Name Description
Attributes

Gets the attributes.

Class

Gets or sets the "class" attribute.

Classes

Gets the collection of CSS classes.

ElementType

Gets the type of the element passed to the constructor.

InnerHtml

Gets or sets the inner HTML.

InnerText

Gets or sets the inner text.

IsIdRequired

Gets a value indicating whether a client control ID is required for this element and any child elements.

Style

Gets or sets the "style" attribute.

Methods

Name Description
GetChildControls

Gets the child controls.

GetClientResources

Returns the required client resources.

GetControlsFromArgument(object arg, System.Web.UI.IAttributeAccessor attributeSource)

Gets the controls from the argument.

Initialize

Called before the control is rendered.

Render(System.Web.UI.HtmlTextWriter writer)

Sends server control content to a provided System.Web.UI.HtmlTextWriter object, which writes the content to be rendered on the client.

ToString

Returns a System.String that represents this instance.

WriteHtml(SlimHtmlTextWriter writer)

Writes the HTML.

WriteInnerHtml(SlimHtmlTextWriter writer)

Writes the inner HTML.

Remarks

The ASP.NET page lifecycle should not be used, and most of the methods of been sealed or obsoleted for your protection. Instead, you can utilize the following.

  • Inedo.Web.Controls.Element.CreateChildControls: constructor

  • Inedo.Web.Controls.Element.OnInit(System.EventArgs): constructor or Initialize

  • Inedo.Web.Controls.Element.OnLoad(System.EventArgs): constructor or Initialize