ChtmlTextWriter.WriteBreak Method ()
Writes a br element to the cHTML output stream.
Assembly: System.Web (in System.Web.dll)
Use themethod to insert a line break into a stream of cHMTL.
This section contains two code examples. The first code example demonstrates how to create a cHTML class and custom properties. The second code example demonstrates how to use a custom class on a Web page.
To use the custom ChtmlSimplelabelAdapter adapter, add the following code to either the appropriate machine-wide file in the subdirectory for the browser of the .NET Framework configuration directory or to a custom browser file in the App_Browsers directory under the Web application root.
<controlAdapters> <adapter controlType="AspNet.Samples.SimpleLabel" adapterType="AspNet.Samples.ChtmlSimpleLabelAdapter" /> </controlAdapters>
The following code example demonstrates how to create a cHTML adapter class named ChtmlSimpleLabelAdapter for a class named SimpleLabel. It creates a custom Control property that allows the ChtmlSimpleLabelAdapter class to access the members of the SimpleLabel class, and then overrides the Render method. In the override, the following things occur:
It creates a string and sets it equal to the SimpleLabel.Text value.
It writes the Text property value to the stream and closes the style block by calling the ExitStyle method.
It calls themethod to render a br element to the output stream after the text and styles render.
The following example demonstrates how to use the SimpleLabel class in a Web page.
Available since 2.0