System.Web.UI.HtmlTextWriter.ExitStyle Method

Writes the closing tag of a <span> element to end the specified layout and character formatting.

Syntax

public virtual void ExitStyle (System.Web.UI.WebControls.Style style)

Parameters

style
A System.Web.UI.WebControls.Style that specifies the layout and formatting to close.

Remarks

The HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style) overload of the HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style) method renders the closing tag of a <span> element after the closing tag of the control, closing the element opened by the corresponding HtmlTextWriter.EnterStyle(System.Web.UI.WebControls.Style) call.

The HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style) and HtmlTextWriter.EnterStyle(System.Web.UI.WebControls.Style) methods allow a device adapter or control to create markup that begins and ends a block by using the character formatting of the specified style. Use the same value for style in the HtmlTextWriter.EnterStyle(System.Web.UI.WebControls.Style) method that you use in the corresponding HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style) method.

Requirements

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