summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-03-27 04:33:13 +0000
committerxue <>2006-03-27 04:33:13 +0000
commit84cd815b93ddbb19c3f1314b7135b1c373ce421c (patch)
tree65b7931691e84e9a7e22f3fe0c0362d4f43cb31a
parent3192eb5cafef46ed5203a8cb2f7ae885e5693a47 (diff)
Added TLiteral, TPlaceHolder demos.
-rw-r--r--.gitattributes3
-rw-r--r--demos/quickstart/protected/pages/Controls/Literal.page15
-rw-r--r--demos/quickstart/protected/pages/Controls/PlaceHolder.page6
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TLiteral/Home.page13
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.page11
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.php16
-rw-r--r--demos/quickstart/protected/pages/Controls/Standard.page4
7 files changed, 66 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes
index bfe295c5..65ec8a99 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -200,9 +200,12 @@ demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.php -text
+demos/quickstart/protected/pages/Controls/Samples/TLiteral/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TPanel/hello_world.gif -text
+demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.page -text
+demos/quickstart/protected/pages/Controls/Samples/TPlaceHolder/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TRadioButton/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TRadioButton/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page -text
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 &lt;div&gt; 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>