From 658a7e1c4cf5a53dcd61ee196658090d00f2d64a Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 29 Dec 2005 11:52:31 +0000 Subject: Used THighlighter to show code fragments. --- .../protected/pages/Fundamentals/Controls.page | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'demos/quickstart/protected/pages/Fundamentals/Controls.page') diff --git a/demos/quickstart/protected/pages/Fundamentals/Controls.page b/demos/quickstart/protected/pages/Fundamentals/Controls.page index cc0b3eda..a90dd604 100644 --- a/demos/quickstart/protected/pages/Fundamentals/Controls.page +++ b/demos/quickstart/protected/pages/Fundamentals/Controls.page @@ -10,10 +10,10 @@ Controls are related to each other via parent-child relationship. Each parent co

The parent-child relationship is usually established by the framework via templates. In code, you may explicitly specify a control as a child of another using one of the following methods, -

+
 $parent->Controls->add($child);
 $parent->Controls[]=$child;
-
+ where the property Controls refers to the child control collection of the parent.

@@ -39,12 +39,12 @@ PRADO borrows the viewstate and controlstate concept from Microsoft ASP.NET to p

Viewstate and controlstate are implemented in TControl. They are commonly used to define various properties of controls. To save and retrieve values from viewstate or controlstate, use following methods, -

-$this->getViewState('Name',$defaultValue);
-$this->setViewState('Name',$value,$defaultValue);
-$this->getControlState('Name',$defaultValue);
-$this->setControlState('Name',$value,$defaultValue);
-
+ +$this->getViewState('Name',$defaultValue); +$this->setViewState('Name',$value,$defaultValue); +$this->getControlState('Name',$defaultValue); +$this->setControlState('Name',$value,$defaultValue); + where $this refers to the control instance, Name refers to a key identifying the persistent value, $defaultValue is optional. When retrieving values from viewstate or controlstate, if the corresponding key does not exist, the default value will be returned.

-- cgit v1.2.3