Export (0) Print
Expand All

Control.RenderControl Method (HtmlTextWriter, ControlAdapter)

Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

protected void RenderControl(
	HtmlTextWriter writer,
	ControlAdapter adapter
)

Parameters

writer
Type: System.Web.UI.HtmlTextWriter

The HtmlTextWriter that receives the control content.

adapter
Type: System.Web.UI.Adapters.ControlAdapter

The ControlAdapter that defines the rendering.

ASP.NET Web pages are usable across a wide range of devices and browsers that can request information from the Web. The Adapter property returns the ControlAdapter object that renders the control on the requesting device or browser's screen.

For more information about adapters, see Architectural Overview of Adaptive Control Behavior.

If a server control's Visible property is set to true and tracing is enabled for the page, then trace information associated with the control is captured.

Notes to Inheritors

When overriding the RenderControl method in custom controls, call the base class method to ensure trace information is correctly captured.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft