Command <%...%> code section Foundation
Defines a code section
<% ... %> or
<%
...
%>
A <CXP/> file normally contains HTML tags, just like an HTML file. However, a <CXP/> file can also contain code sections surrounded by the tags <% and %>. These code sections are executed on the server and can be made up of any expression, statement, procedure, or class valid in the Xbase++ language.
Inside a code section, the ? command is used to write to the current output section. The following example writes the string "Hello World" into the body element of the document.
The command ? internally uses the method ::HttpResponse:WriteStr(), which performs HTML-encoding and appends a CRLF-pair to the string. Data without a line break can be output using the command ??, which uses the ::HttpResponse:Write() method instead. To output the data as-is, without any encoding or line breaks, the method ::HttpResponse:WriteRaw() must be called directly.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.