summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TTextBox
diff options
context:
space:
mode:
authorxue <>2006-01-20 18:04:41 +0000
committerxue <>2006-01-20 18:04:41 +0000
commit22c0b4956ff476ae165bf93a448f0980dfa050f3 (patch)
tree188bf9444136171583e95ab713ee665c4e365ee5 /demos/quickstart/protected/pages/Controls/Samples/TTextBox
parent3ce5882c8f5a18aa5e6b0e110f3d8877d4448a26 (diff)
Added Validation test cases for TTextBox
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TTextBox')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page44
1 files changed, 40 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
index c8315e42..246ecfec 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
@@ -45,19 +45,37 @@ Read-only text box:
</td></tr>
<tr><td class="samplenote">
-Auto postback text box:
+Auto postback text box not causing validation:
</td><td class="sampleaction">
<com:TTextBox
Text="change me"
AutoPostBack="true"
+ CausesValidation="false"
TextChanged="textChanged" />
</td></tr>
<tr><td class="samplenote">
+Auto postback text box causing validation:
+</td><td class="sampleaction">
+<com:TTextBox ID="TextBox3"
+ AutoPostBack="true"
+ ValidationGroup="Group1"
+ Text="change me" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox3"
+ ErrorMessage="You must enter 'test'."
+ InitialValue="test"
+ ValidationGroup="Group1" />
+</td></tr>
+
+<tr><td class="samplenote">
Text box's behavior upon postback:
</td><td class="sampleaction">
<com:TTextBox ID="TextBox1" Text="text" />
-<com:TButton Text="Submit" Click="submitText" />
+<com:TButton
+ Text="Submit"
+ CausesValidation="false"
+ Click="submitText" />
</td></tr>
<tr><td class="samplenote">
@@ -69,7 +87,9 @@ Safety feature (cross-site scripting prevention):
Text="<a href=javascript:xxx>test</a>"
Width="200px"/>
<b>SafeText:</b>
-<com:TLabel BackColor="silver" ID="Output" Text=<%#$this->Page->TextBox2->SafeText%> />
+<com:TLabel ID="Output"
+ BackColor="silver"
+ Text=<%#$this->Page->TextBox2->SafeText%> />
</td></tr>
</table>
@@ -120,15 +140,31 @@ Read-only text box with text-wrapping disabled:
</td></tr>
<tr><td class="samplenote">
-Auto postback text box:
+Auto postback text box not causing validation:
</td><td class="sampleaction">
<com:TTextBox
TextMode="MultiLine"
Text="change me"
AutoPostBack="true"
+ CausesValidation="false"
TextChanged="textChanged" />
</td></tr>
+<tr><td class="samplenote">
+Auto postback text box causing validation:
+</td><td class="sampleaction">
+<com:TTextBox ID="MultiTextBox3"
+ TextMode="MultiLine"
+ AutoPostBack="true"
+ ValidationGroup="Group2"
+ Text="change me" />
+<com:TRequiredFieldValidator
+ ControlToValidate="MultiTextBox3"
+ ErrorMessage="You must enter 'test'."
+ InitialValue="test"
+ ValidationGroup="Group2" />
+</td></tr>
+
</table>
</com:TContent> \ No newline at end of file