System.Web.UI.WebControls.Adapters.MenuAdapter.RenderBeginTag Method

Adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the browser or device.

Syntax

protected override void RenderBeginTag (System.Web.UI.HtmlTextWriter writer)

Parameters

writer
The System.Web.UI.HtmlTextWriter instance containing methods to build and render the device-specific output.

Remarks

The MenuAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter) method adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the response stream for the client browser. The System.Web.UI.WebControls.MenuItem objects will be rendered individually in the MenuAdapter.RenderContents(System.Web.UI.HtmlTextWriter) method and the control will be closed with a call to the subsequent MenuAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter) method.

Override MenuAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter) when you want to implement custom behavior. For example, override the method to write multiple tags to the response stream before any control content, such as <table><tr><td>. Use the MenuAdapter.RenderBeginTag(System.Web.UI.HtmlTextWriter) method in conjunction with the MenuAdapter.RenderEndTag(System.Web.UI.HtmlTextWriter) method to assure opening and closing tag consistency in your output.

Requirements

Namespace: System.Web.UI.WebControls.Adapters
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0