MultiValue Quick Start Tutorial
Adding MVBasic Code — Expressions
[Home] [Back] [Next]
InterSystems: The power behind what matters   

CSP expressions provide another way to add MVBasic code to a page. Using a CSP expression you can include the value returned by a single MVBasic expression. The MVBasic expression must be surrounded by #( and )#. Here is the format:

Here are the steps for adding a CSP expression to FirstPage.CSP:
  1. Open FirstPage.CSP in Studio.
  2. Verify that the following directive is at the very top of the file. The directive sets the default “page language” of the CSP page to MVBasic
    <%@page language="mvbasic"%>                                   
  3. Replace any code or HTML currently between the <body></body> tags with the following:
    <h2>Welcome to CSP!</h2>
    <p>The current date and time is #(TIMEDATE())#</p>         
  4. FirstPage.CSP code looks like this
  5. Click Build–>Compile to recompile FirstPage.CSP
  6. Click View–>Web Page to see the new page:
To learn more about CSP Expressions, read CSP: Elements in the CSP QuickStart Tutorial.

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA