summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples
diff options
context:
space:
mode:
authorwei <>2006-09-10 01:03:56 +0000
committerwei <>2006-09-10 01:03:56 +0000
commitf1f33db1f85c0893205a4a00c203d884dc1af1a5 (patch)
treede0fd5a1b52572708209c98370c9061a19ec5193 /demos/quickstart/protected/pages/ActiveControls/Samples
parentfa760c403236b6fe7fdfd5785e2cd34764c24755 (diff)
Changed TCallbackEventParameter::Parameter to TCallbackEventParameter::CallbackParameter
Add TActiveButton and TActiveCheckBox quickstart docs.
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page49
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php20
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page77
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.php16
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/config.xml8
5 files changed, 170 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page
new file mode 100644
index 00000000..259541a2
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page
@@ -0,0 +1,49 @@
+<com:TContent ID="body">
+<!-- $Id$ -->
+<h1>TActiveButton Samples (AJAX)</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A click button with <tt>OnClick</tt> event handler:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnClick="buttonClicked" />
+</td></tr>
+
+<tr><td class="samplenote">
+A command button with <tt>OnCallback</tt>:
+</td><td class="sampleaction">
+<com:TActiveButton
+ Text="click me"
+ OnCommand="buttonClicked"
+ CommandName="test"
+ ActiveControl.CallbackParameter="value"
+ CommandParameter="value"
+ OnCallback="buttonCallback"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A button causing validation with <tt>OnCallback</tt>:
+</td><td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="input required in the textbox"
+ ValidationGroup="Group"
+ />
+<com:TActiveButton
+ Text="submit"
+ OnClick="buttonClicked"
+ OnCallback="buttonCallback"
+ ValidationGroup="Group" />
+</td></tr>
+
+</table>
+
+<com:TJavascriptLogger />
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php
new file mode 100644
index 00000000..4a4e23ca
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.php
@@ -0,0 +1,20 @@
+<?php
+
+// $Id$
+class Home extends TPage
+{
+ public function buttonClicked($sender, $param)
+ {
+ if($param instanceof TCommandEventParameter)
+ $sender->Text="Name: {$param->CommandName}, Param: {$param->CommandParameter}";
+ else
+ $sender->Text="I'm clicked";
+ }
+
+ public function buttonCallback($sender, $param)
+ {
+ $sender->Text .= ' using callback';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page
new file mode 100644
index 00000000..cbe58134
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page
@@ -0,0 +1,77 @@
+<com:TContent ID="body">
+<!-- $Id$ -->
+<h1>TActiveCheckBox Samples (AJAX)</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+An active checkbox with <tt>OnCallback</tt>:
+</td><td class="sampleaction">
+<com:TActiveCheckBox
+ AutoPostBack="true"
+ Text="click me"
+ OnCheckedChanged="checkboxClicked"
+ OnCallback="checkboxCallback"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A checkbox causing validation on a textbox:
+</td><td class="sampleaction">
+<com:TTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="input required in the textbox"
+ ValidationGroup="Group"
+ />
+<com:TActiveCheckBox
+ Text="submit"
+ ValidationGroup="Group"
+ OnCheckedChanged="checkboxClicked"
+ OnCallback="checkboxCallback"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A checkbox validated by a required field validator:
+</td><td class="sampleaction">
+<com:TActiveCheckBox
+ ID="CheckBox"
+ Text="Consent"
+ AutoPostBack="false"
+ OnCheckedChanged="checkboxClicked"
+ ValidationGroup="Group2"
+ />
+<com:TActiveButton Text="Submit" ValidationGroup="Group2" />
+<com:TRequiredFieldValidator
+ ControlToValidate="CheckBox"
+ Display="Dynamic"
+ ErrorMessage="You must consent."
+ ValidationGroup="Group2"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A checkbox validated by a required field validator:
+</td><td class="sampleaction">
+<com:TActiveCheckBox
+ ID="CheckBox2"
+ Text="Agree"
+ Checked="true"
+ OnCheckedChanged="checkboxClicked"
+ ValidationGroup="Group3"
+ />
+<com:TRequiredFieldValidator
+ ControlToValidate="CheckBox2"
+ Display="Dynamic"
+ ErrorMessage="You must agree."
+ ValidationGroup="Group3"
+ />
+</td></tr>
+
+</table>
+
+<com:TJavascriptLogger />
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.php
new file mode 100644
index 00000000..f0543695
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.php
@@ -0,0 +1,16 @@
+<?php
+// $Id$
+class Home extends TPage
+{
+ public function checkboxClicked($sender,$param)
+ {
+ $sender->Text= $sender->ClientID . " clicked";
+ }
+
+ public function checkboxCallback($sender, $param)
+ {
+ $sender->Text .= ' using callback';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/config.xml b/demos/quickstart/protected/pages/ActiveControls/Samples/config.xml
new file mode 100644
index 00000000..d30f3ca6
--- /dev/null
+++ b/demos/quickstart/protected/pages/ActiveControls/Samples/config.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<configuration>
+ <paths>
+ <using namespace="System.Web.UI.ActiveControls.*" />
+ </paths>
+ <pages MasterClass="SampleLayout" />
+</configuration> \ No newline at end of file