summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals/Controls.page
diff options
context:
space:
mode:
authorxue <>2005-12-28 13:11:07 +0000
committerxue <>2005-12-28 13:11:07 +0000
commit6ea993425cc0982ecef765d4bfc6b75b7206416d (patch)
tree98b8960722366ed2a3722f755ddc3cac1ab408a6 /demos/quickstart/protected/pages/Fundamentals/Controls.page
parentdeba7a5f81931dbe20aceebd506f44d5fdc1f7ca (diff)
Diffstat (limited to 'demos/quickstart/protected/pages/Fundamentals/Controls.page')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Controls.page14
1 files changed, 7 insertions, 7 deletions
diff --git a/demos/quickstart/protected/pages/Fundamentals/Controls.page b/demos/quickstart/protected/pages/Fundamentals/Controls.page
index 6c45acf1..cc0b3eda 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Controls.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Controls.page
@@ -1,7 +1,7 @@
<com:TContent ID="body" >
<h1>Controls</h1>
<p>
-A control is an instance of class <code>TControl</code> or its subclass. A control is a component defined in addition with user interface. The base class <code>TControl</code> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
+A control is an instance of class <tt>TControl</tt> or its subclass. A control is a component defined in addition with user interface. The base class <tt>TControl</tt> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
</p>
<h2>Control Tree</h2>
@@ -14,20 +14,20 @@ The parent-child relationship is usually established by the framework via <a hre
$parent->Controls->add($child);
$parent->Controls[]=$child;
</pre>
-where the property <code>Controls</code> refers to the child control collection of the parent.
+where the property <tt>Controls</tt> refers to the child control collection of the parent.
</p>
<h2>Control Identification</h2>
<p>
-Each control has an <code>ID</code> property that can be uniquely identify itself among its sibling controls. In addition, each control has a <code>UniqueID</code> and a <code>ClientID</code> which can be used to globally identify the control in the tree that the control resides in. <code>UniqueID</code> and <code>ClientID</code> are very similar. The former is used by the framework to determine the location of the corresponding control in the tree, while the latter is mainly used on the client side as HTML tag IDs. In general, you should not rely on the explicit format of <code>UniqueID</code> or <code>ClientID</code>.
+Each control has an <tt>ID</tt> property that can be uniquely identify itself among its sibling controls. In addition, each control has a <tt>UniqueID</tt> and a <tt>ClientID</tt> which can be used to globally identify the control in the tree that the control resides in. <tt>UniqueID</tt> and <tt>ClientID</tt> are very similar. The former is used by the framework to determine the location of the corresponding control in the tree, while the latter is mainly used on the client side as HTML tag IDs. In general, you should not rely on the explicit format of <tt>UniqueID</tt> or <tt>ClientID</tt>.
</p>
<h2>Naming Containers</h2>
<p>
-Each control has a naming container which is a control creating a unique namespace for differentiating between controls with the same <code>ID</code>. For example, a <code>TRepeater</code> control creates multiple items each having child controls with the same <code>ID</code>s. To differentiate these child controls, each item serves as a naming container. Therefore, a child control may be uniquely identified using its naming container's <code>ID</code> together with its own <code>ID</code>. As you may already have understood, <code>UniqueID</code> and <code>ClientID</code> rely on the naming containers.
+Each control has a naming container which is a control creating a unique namespace for differentiating between controls with the same <tt>ID</tt>. For example, a <tt>TRepeater</tt> control creates multiple items each having child controls with the same <tt>ID</tt>s. To differentiate these child controls, each item serves as a naming container. Therefore, a child control may be uniquely identified using its naming container's <tt>ID</tt> together with its own <tt>ID</tt>. As you may already have understood, <tt>UniqueID</tt> and <tt>ClientID</tt> rely on the naming containers.
</p>
<p>
-A control can serve as a naming container if it implements the <code>INamingContainer</code> interface.
+A control can serve as a naming container if it implements the <tt>INamingContainer</tt> interface.
</p>
<h2>ViewState and ControlState</h2>
@@ -38,14 +38,14 @@ HTTP is a stateless protocol, meaning it does not provide functionality to suppo
PRADO borrows the viewstate and controlstate concept from Microsoft ASP.NET to provides additional stateful programming mechanism. A value storing in viewstate or controlstate may be available to the next requests if the new requests are form submissions (called postback) to the same page by the same user. The difference between viewstate and controlstate is that the former can be disabled while the latter cannot.
</p>
<p>
-Viewstate and controlstate are implemented in <code>TControl</code>. They are commonly used to define various properties of controls. To save and retrieve values from viewstate or controlstate, use following methods,
+Viewstate and controlstate are implemented in <tt>TControl</tt>. They are commonly used to define various properties of controls. To save and retrieve values from viewstate or controlstate, use following methods,
<pre class="source">
$this-&gt;getViewState('Name',$defaultValue);
$this-&gt;setViewState('Name',$value,$defaultValue);
$this-&gt;getControlState('Name',$defaultValue);
$this-&gt;setControlState('Name',$value,$defaultValue);
</pre>
-where <code>$this</code> refers to the control instance, <code>Name</code> refers to a key identifying the persistent value, <code>$defaultValue</code> is optional. When retrieving values from viewstate or controlstate, if the corresponding key does not exist, the default value will be returned.
+where <tt>$this</tt> refers to the control instance, <tt>Name</tt> refers to a key identifying the persistent value, <tt>$defaultValue</tt> is optional. When retrieving values from viewstate or controlstate, if the corresponding key does not exist, the default value will be returned.
</p>
</com:TContent> \ No newline at end of file