| 1 |
lars |
1 |
<com:TContent ID="body" >
|
|
|
2 |
|
|
|
3 |
<h1 id="2401">TExpression</h1>
|
|
|
4 |
<com:DocLink ClassPath="System.Web.UI.WebControls.TExpression" />
|
|
|
5 |
|
|
|
6 |
<p id="290254" class="block-content">
|
|
|
7 |
<tt>TExpression</tt> evaluates a PHP expression and displays the evaluation result. To specify the expression to be evaluated, set the <tt>Expression</tt> property. Note, <tt>TExpression</tt> evaluates the expression during the rendering control lifecycle.
|
|
|
8 |
</p>
|
|
|
9 |
|
|
|
10 |
<p id="290255" class="block-content">
|
|
|
11 |
The context of the expression in a <tt>TExpression</tt> control is the control itself. That is, <tt>$this</tt> represents the control object if it is present in the expression. For example, the following template tag will display the title of the page containing the <tt>TExpression</tt> control.
|
|
|
12 |
</p>
|
|
|
13 |
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_290104">
|
|
|
14 |
<com:TExpression Expression="$this->Page->Title" />
|
|
|
15 |
</com:TTextHighlighter>
|
|
|
16 |
|
|
|
17 |
<p id="290256" class="block-content">
|
|
|
18 |
Be aware, since <tt>TExpression</tt> allows execution of arbitrary PHP code, in general you should not use it to evaluate expressions submitted by your application users.
|
|
|
19 |
</p>
|
|
|
20 |
|
|
|
21 |
<com:RunBar PagePath="Controls.Samples.TExpression.Home" />
|
|
|
22 |
|
|
|
23 |
<div class="last-modified">$Id: Expression.page 1650 2007-01-24 06:55:32Z wei $</div></com:TContent>
|