WriteHtmlPlainText - cWebAspClassicObject
Encodes and then outputs the passed text to the HTML file
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| sTxt | String | Data string to write to browser |
Syntax
Procedure WriteHtmlPlainText String sTxt
Call Example
Send WriteHtmlPlainText sTxt
Description
WriteHtmlPlainText encodes and then outputs the passed text to the HTML file. The text is encoded so that all special HTML characters (e.g, "<", ">") are converted to their proper HTML replacements (i.e., "<" ">";).
The following text will be encoded and output properly to HTML.
Send WriteHtmlPlainText Customer.Name
Be careful how you use this. The following message would probably not yield the desired results.
Send WriteHtmlPlainText ("<b>" + Customer.Notes + "</b>")
Rather than displaying the text in bold you would see the text displayed exactly as it was sent (you would see the and the) . To get the desired results you could do one of the following:
Send WriteHTML ("<b>" + HTMLEncode(Customer.Notes) + "</b>")
Or:
Send WriteHtml "<b>"
Send WriteHtmlPlainText Customer.Notes
Send WriteHtml "<b>"
DataFlex Code
Send WriteHtmlPlainText Customer.Name