diff options
author | xue <> | 2006-04-07 03:32:11 +0000 |
---|---|---|
committer | xue <> | 2006-04-07 03:32:11 +0000 |
commit | 370c682479edb2fd3f40ee701f7bb4ef088e8283 (patch) | |
tree | d5fee37ac2b40a3a984bf860bce09562a8532040 /demos/quickstart/protected/pages/Controls/Statements.page | |
parent | 8b7717c06b86262d188827fb26a4bfb2e480c256 (diff) |
Breaking change!! Optimized the representation and evaluation of template expression, statements and databind tags.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Statements.page')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Statements.page | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Statements.page b/demos/quickstart/protected/pages/Controls/Statements.page index c6807738..dd26ec1b 100644 --- a/demos/quickstart/protected/pages/Controls/Statements.page +++ b/demos/quickstart/protected/pages/Controls/Statements.page @@ -4,34 +4,31 @@ <com:DocLink ClassPath="System.Web.UI.WebControls.TStatements" />
<p>
-<tt>TStatements</tt> evaluates a sequence of PHP statements and displays the content rendered by the statements. To specify the PHP statements to be evaluated, set the <tt>Statements</tt> property. In a control template, <a href="?page=Configurations.Templates2#st">statement tags</a> are often used instead of the complete <a href="?page=Configurations.Templates1#ct">component tags</a> when the main purpose is to display the result rendered by some PHP statements. For example, the following two tags are equivalent,
+<tt>TStatements</tt> evaluates a sequence of PHP statements and displays the content rendered by the statements. To specify the PHP statements to be evaluated, set the <tt>Statements</tt> property. For example, the following component tag displays the current time on the Web page,
</p>
<com:TTextHighlighter Language="prado" CssClass="source">
<com:TStatements>
- <prop:Expression>
+ <prop:Statements>
setlocale(LC_ALL, 'nl_NL');
echo strftime("%A %e %B %Y",time());
- </prop:Expression>
+ </prop:Statements>
</com:TStatements>
-
-<%%
- setlocale(LC_ALL, 'nl_NL');
- echo strftime("%A %e %B %Y",time());
-%>
</com:TTextHighlighter>
<p>
-<tt>TStatements</tt> evaluates the PHP statements during the rendering control lifecycle. Unlike <tt>TExpression</tt>, <tt>TStatements</tt> only displays the content 'echoed' within the statements.
+Note, <tt>TStatements</tt> evaluates the PHP statements during the rendering control lifecycle. Unlike <tt>TExpression</tt>, <tt>TStatements</tt> only displays the content 'echoed' within the statements.
</p>
<p>
The context of the statements in a <tt>TStatements</tt> control is the control itself. That is, <tt>$this</tt> represents the control object if it is present in the statements. For example, the following statement tag will display the title of the page containing the <tt>TStatements</tt> control.
</p>
<com:TTextHighlighter Language="prado" CssClass="source">
-<%%
+<com:TStatements>
+ <prop:Statements>
$page=$this->Page;
echo $page->Title;
-%>
+ </prop:Statements>
+</com:TStatements>
</com:TTextHighlighter>
<p>
|