Writes the closing tag of the specified markup element to end the specified layout and character formatting.
- style
- A System.Web.UI.WebControls.Style that specifies the layout and formatting to stop applying to the output text.
- tag
- An System.Web.UI.HtmlTextWriterTag that specifies the closing tag of the markup element that contained the attributes that applied the specified style. This must match the key passed in the corresponding HtmlTextWriter.EnterStyle call.
The HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) overload of the HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) method renders the closing tag of the element that is specified by tag after the closing tag of the control, closing the element that was opened by the corresponding HtmlTextWriter.EnterStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) method call.
The HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) and HtmlTextWriter.EnterStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) 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, HtmlTextWriterTag) method that you use in the corresponding HtmlTextWriter.ExitStyle(System.Web.UI.WebControls.Style, HtmlTextWriterTag) method.