MenuAdapter.RenderContents Method

Writes the associated menu items in the associated Menu control to the output stream as a series of hyperlinks.

Namespace: System.Web.UI.WebControls.Adapters
Assembly: System.Web (in system.web.dll)

protected:
virtual void RenderContents (
	HtmlTextWriter^ writer
) override
protected void RenderContents (
	HtmlTextWriter writer
)
protected override function RenderContents (
	writer : HtmlTextWriter
)
Not applicable.

Parameters

writer

The HtmlTextWriter containing methods to build and render the device-specific output.

Exception typeCondition

InvalidOperationException

The depth of the current item is more than allowed.

-or-

The current item is disabled.

The RenderContents method writes the MenuItem objects of the associated Menu control to the output stream as hyperlinks. The RenderContents method is called from the Render method and is used to perform modifications to the markup code that is rendered to a device browser.

Control properties should be set prior to this phase of the life cycle, and only the actual markup creation for the control done here. Changes made to the control in this stage of the life cycle are not saved to view state. For saving changes made to the control, override the OnPreRender event.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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

Community Additions

ADD
Show: