MenuAdapter::RenderContents Method
Writes the associated menu items in the associated Menu control to the output stream as a series of hyperlinks.
Assembly: System.Web (in System.Web.dll)
Parameters
- writer
- Type: System.Web.UI::HtmlTextWriter
The HtmlTextWriter containing methods to build and render the device-specific output.
| Exception | Condition |
|---|---|
| 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 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.