WriteHtml - cWebAspClassicObject

Outputs the passed string to the web page and ends the line

Type: Procedure

Parameters: String sHtml

sHtmlData string to write to browser

Procedure WriteHtml String sHtml

Call: Send WriteHtml sHtml


WriteHtml outputs the passed string to the web page and ends the line. When passing strings you will probably first want to encode the Html string, so special characters will not be read as HTML characters.

Typical output message might look like:

Send WriteHtml (HtmlEncode(Customer.Name))

Remember that HtmlEncode is a global method - it does not require an object parameter.

This outputs the passed string to the HTML file. The text is passed unfiltered to the HTML page (unless the HtmlEncode function is used). All of the other WBO HTML messages use this message to output HTML. You may use this to generate any type of valid HTML output you want.

Note: The text is not processed in any way. If the string contains valid HTML formatting characters (i.e., ), they will be interpreted by your browser as formatting commands. If your text contains characters that should not be "misunderstood" by HTML, you should encode them using the HtmlEncode function.

With the exception of the WriteHtmlPlainText message, all of the other WriteHtmlxxx messages eventually send this message.

DataFlex Code

Send WriteHtml (HTMLEncode(Customer.Name))
Send WriteHtml ("<strong>" + HTMLEncode(Customer.Notes) + "</strong>")