diff options
Diffstat (limited to 'demos/quickstart/protected/pages')
6 files changed, 63 insertions, 2 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Literal.page b/demos/quickstart/protected/pages/Controls/Literal.page index edf3bf09..d7b44aff 100644 --- a/demos/quickstart/protected/pages/Controls/Literal.page +++ b/demos/quickstart/protected/pages/Controls/Literal.page @@ -3,4 +3,19 @@ <h1>TLiteral</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.TLiteral" />
+<p>
+<tt>TLiteral</tt> displays a static text on a Web page. <tt>TLiteral</tt> is similar to the <tt>TLabel</tt> control, except that the <tt>TLiteral</tt>
+ * control does not allow child controls and has no style properties, such as <tt>BackColor</tt>, <tt>Font</tt>, etc.
+</p>
+
+<p>
+The text displayed by <tt>TLiteral</tt> can be programmatically controlled by setting the <tt>Text</tt> property. The text displayed may be HTML-encoded if the <tt>Encode</tt> is true (the default value is false).
+</p>
+
+<p>
+Be aware, if <tt>Encode</tt> is false, make sure <tt>Text</tt> does not contain unwanted characters that may bring security vulnerabilities.
+</p>
+
+<com:RunBar PagePath="Controls.Samples.TLiteral.Home" />
+
</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/PlaceHolder.page b/demos/quickstart/protected/pages/Controls/PlaceHolder.page index 1291c149..323b1d52 100644 --- a/demos/quickstart/protected/pages/Controls/PlaceHolder.page +++ b/demos/quickstart/protected/pages/Controls/PlaceHolder.page @@ -3,4 +3,10 @@ <h1>TPlaceHolder</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.TPlaceHolder" />
+<p>
+<tt>TPlaceHolder</tt> reserves a place on a template, where static texts or controls may be dynamically inserted.
+</p>
+
+<com:RunBar PagePath="Controls.Samples.TPlaceHolder.Home" />
+
</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TLiteral/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TLiteral/Home.page new file mode 100644 index 00000000..118d1627 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TLiteral/Home.page @@ -0,0 +1,13 @@ +<com:TContent ID="body">
+
+<h1>TLiteral Sample</h1>
+
+<p>
+<com:TLiteral Text="This is a piece of unencoded text." />
+</p>
+
+<p>
+<com:TLiteral Text="This is a piece of encoded <a>text</a>." Encode="true"/>
+</p>
+
+</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.page new file mode 100644 index 00000000..f2b0d372 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.page @@ -0,0 +1,11 @@ +<com:TContent ID="body">
+
+<h1>TPlaceHolder Sample</h1>
+
+<p>
+This sample shows how to insert <com:TPlaceHolder ID="PlaceHolder1" />
+at a place that is reserved on a template. The dynamic content can be
+either static texts or controls.
+</p>
+
+</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.php new file mode 100644 index 00000000..ecae7876 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.php @@ -0,0 +1,16 @@ +<?php
+
+class Home extends TPage
+{
+ public function onInit($param)
+ {
+ parent::onInit($param);
+ $label=new TLabel;
+ $label->Text='dynamic';
+ $label->BackColor='silver';
+ $this->PlaceHolder1->Controls[]=$label;
+ $this->PlaceHolder1->Controls[]=' content';
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page index d6070986..026d3d1a 100644 --- a/demos/quickstart/protected/pages/Controls/Standard.page +++ b/demos/quickstart/protected/pages/Controls/Standard.page @@ -71,7 +71,7 @@ <a href="?page=Controls.LinkButton">TLinkButton</a> represents a hyperlink that can perform page postbacks.
</li>
- <li>*
+ <li>
<a href="?page=Controls.Literal">TLiteral</a> represents a static text without any HTML tag surrounding it on a Web page.
</li>
@@ -83,7 +83,7 @@ <a href="?page=Controls.Panel">TPanel</a> represents a container for other controls on a Web page. In HTML, it is displayed as a <div> element.
</li>
- <li>*
+ <li>
<a href="?page=Controls.PlaceHolder">TPlaceHolder</a> reserves a place on a control template. It inserts its body content at that place.
</li>
|