Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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
)
protected void RenderControl (
	HtmlTextWriter writer, 
	ControlAdapter adapter
)
protected function RenderControl (
	writer : HtmlTextWriter, 
	adapter : ControlAdapter
)
Not applicable.

Parameters

writer

The HTmlTextWriter that receives the control content.

adapter

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 Rendering.

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.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft