System.Web.UI.Control Members

The members of System.Web.UI.Control are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Web.UI.Control class.

Public Properties

AppRelativeTemplateSourceDirectorystring.

Gets or sets the application-relative virtual directory of the System.Web.UI.Page or System.Web.UI.UserControl object that contains this control.

[read-only]
BindingContainerControl.

Gets the control that contains this control's data binding.

[read-only]
ClientIDstring.

Gets the control ID for HTML markup that is generated by ASP.NET.

[read-only]
ControlsControlCollection.

Gets a System.Web.UI.ControlCollection object that represents the child controls for a specified server control in the UI hierarchy.

EnableThemingbool.

Gets or sets a value indicating whether themes apply to this control.

EnableViewStatebool.

Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.

IDstring.

Gets or sets the programmatic identifier assigned to the server control.

[read-only]
NamingContainerControl.

Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same Control.ID property value.

PagePage.

Gets a reference to the System.Web.UI.Page instance that contains the server control.

[read-only]
ParentControl.

Gets a reference to the server control's parent control in the page control hierarchy.

SiteSystem.ComponentModel.ISite.

Gets information about the container that hosts the current control when rendered on a design surface.

SkinIDstring.

Gets or sets the skin to apply to the control.

TemplateControlTemplateControl.

Gets or sets a reference to the template that contains this control.

[read-only]
TemplateSourceDirectorystring.

Gets the virtual directory of the System.Web.UI.Page or System.Web.UI.UserControl that contains the current server control.

[read-only]
UniqueIDstring.

Gets the unique, hierarchically qualified identifier for the server control.

Visiblebool.

Gets or sets a value that indicates whether a server control is rendered as UI on the page.

Protected Properties

[read-only]
AdapterSystem.Web.UI.Adapters.ControlAdapter.

Gets the browser-specific adapter for the control.

ChildControlsCreatedbool.

Gets a value that indicates whether the server control's child controls have been created.

[read-only]
ClientIDSeparatorchar.

Gets a character value representing the separator character used in the Control.ClientID property.

[read-only]
ContextSystem.Web.HttpContext.

Gets the System.Web.HttpContext object associated with the server control for the current Web request.

[read-only]
DesignModebool.

Gets a value indicating whether a control is being used on a design surface.

[read-only]
EventsSystem.ComponentModel.EventHandlerList.

Gets a list of event handler delegates for the control. This property is read-only.

[read-only]
HasChildViewStatebool.

Gets a value indicating whether the current server control's child controls have any saved view-state settings.

[read-only]
IdSeparatorchar.

Gets the character used to separate control identifiers.

[read-only]
IsChildControlStateClearedbool.

Gets a value indicating whether controls contained within this control have control state.

[read-only]
IsTrackingViewStatebool.

Gets a value that indicates whether the server control is saving changes to its view state.

[read-only]
IsViewStateEnabledbool.

Gets a value indicating whether view state is enabled for this control.

[read-only]
LoadViewStateByIDbool.

Gets a value indicating whether the control participates in loading its view state by Control.ID instead of index.

[read-only]
ViewStateStateBag.

Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

[read-only]
ViewStateIgnoresCasebool.

Gets a value that indicates whether the System.Web.UI.StateBag object is case-insensitive.

Public Methods

ApplyStyleSheetSkin(Page)

Applies the style properties defined in the page style sheet to the control.

DataBind()

Binds a data source to the invoked server control and all its child controls.

Dispose()

Enables a server control to perform final clean up before it is released from memory.

FindControl(string) : Control

Searches the current naming container for a server control with the specified id parameter.

Focus()

Sets input focus to a control.

HasControls() : bool

Determines if the server control contains any child controls.

RenderControl(HtmlTextWriter)

Outputs server control content to a provided System.Web.UI.HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

ResolveClientUrl(string) : string

Gets a URL that can be used by the browser.

ResolveUrl(string) : string

Converts a URL into one that is usable on the requesting client.

SetRenderMethodDelegate(RenderMethod)

Assigns an event handler delegate to render the server control and its content into its parent control.

Protected Methods

AddedControl(Control, int)

Called after a child control is added to the Control.Controls collection of the System.Web.UI.Control object.

AddParsedSubObject(object)

Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's System.Web.UI.ControlCollection object.

BuildProfileTree(string, bool)

Gathers information about the server control and delivers it to the Page.Trace property to be displayed when tracing is enabled for the page.

ClearChildControlState()

Deletes the control-state information for the server control's child controls.

ClearChildState()

Deletes the view-state and control-state information for all the server control's child controls.

ClearChildViewState()

Deletes the view-state information for all the server control's child controls.

CreateChildControls()

Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.

CreateControlCollection() : ControlCollection

Creates a new System.Web.UI.ControlCollection object to hold the child controls (both literal and server) of the server control.

DataBind(bool)

Binds a data source to the invoked server control and all its child controls with an option to raise the Control.DataBinding event.

DataBindChildren()

Binds a data source to the server control's child controls.

EnsureChildControls()

Determines whether the server control contains child controls. If it does not, it creates child controls.

EnsureID()

Creates an identifier for controls that do not have an identifier assigned.

FindControl(string, int) : Control

Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the erload:System.Web.UI.Control.FindControl method.

GetDesignModeState() : IDictionary

Gets design-time data for a control.

HasEvents() : bool

Returns a value indicating whether events are registered for the control or any child controls.

IsLiteralContent() : bool

Determines if the server control holds only literal content.

LoadControlState(object)

Restores control-state information from a previous page request that was saved by the Control.SaveControlState method.

LoadViewState(object)

Restores view-state information from a previous page request that was saved by the Control.SaveViewState method.

MapPathSecure(string) : string

Retrieves the physical path that a virtual path, either absolute or relative, maps to.

OnBubbleEvent(object, EventArgs) : bool

Determines whether the event for the server control is passed up the page's UI server control hierarchy.

OnDataBinding(EventArgs)

Raises the Control.DataBinding event.

OnInit(EventArgs)

Raises the Control.Init event.

OnLoad(EventArgs)

Raises the Control.Load event.

OnPreRender(EventArgs)

Raises the Control.PreRender event.

OnUnload(EventArgs)

Raises the Control.Unload event.

OpenFile(string) : System.IO.Stream

Gets a System.IO.Stream used to read a file.

RaiseBubbleEvent(object, EventArgs)

Assigns any sources of the event and its information to the control's parent.

RemovedControl(Control)

Called after a child control is removed from the Control.Controls collection of the System.Web.UI.Control object.

Render(HtmlTextWriter)

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

RenderChildren(HtmlTextWriter)

Outputs the content of a server control's children to a provided System.Web.UI.HtmlTextWriter object, which writes the content to be rendered on the client.

RenderControl(HtmlTextWriter, System.Web.UI.Adapters.ControlAdapter)

Outputs server control content to a provided System.Web.UI.HtmlTextWriter object using a provided System.Web.UI.Adapters.ControlAdapter object.

ResolveAdapter() : System.Web.UI.Adapters.ControlAdapter

Gets the control adapter responsible for rendering the specified control.

SaveControlState() : object

Saves any server control state changes that have occurred since the time the page was posted back to the server.

SaveViewState() : object

Saves any server control view-state changes that have occurred since the time the page was posted back to the server.

SetDesignModeState(IDictionary)

Sets design-time data for a control.

TrackViewState()

Causes tracking of view-state changes to the server control so they can be stored in the server control's System.Web.UI.StateBag object. This object is accessible through the Control.ViewState property.

Public Events

DataBinding

Occurs when the server control binds to a data source.

Disposed

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.

Init

Occurs when the server control is initialized, which is the first step in its lifecycle.

Load

Occurs when the server control is loaded into the System.Web.UI.Page object.

PreRender

Occurs after the System.Web.UI.Control object is loaded but prior to rendering.

Unload

Occurs when the server control is unloaded from memory.

Explicitly Implemented Interface Members