This page demonstrates how to implement a code block used within a HtmlBlock control and as a standalone CmnCodeBlock control and finally as a standalone Generic Code Block Module. Since this code block is used for output to the page, the ICodeBlock interface ExecuteWithOutput() method is called in both instances. Code blocks can also implement the Execute() method if they perform some behind the scenes processing without returning any output to be displayed.

CmnHtmlBlock Control

[Content ID: 01ca389e-db84-489c-b5a2-e3ff82470834]
The following is an example of using a code block within a HcpHtmlBlock control: The server time is '10/4/2025 2:36:53 PM'.

CmnCodeBlock Control

[Code Block ID: 1, Method Type: ExecuteWithOutput]
The server time is '10/4/2025 2:36:53 PM'.

GenericCodeBlock Module

[Code Block ID: 1, Method Type: ExecuteWithOutput]
 R4.2
© 2025 Hewlett-Packard Development Company, L.P. All rights reserved. | Privacy Notice