Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<com:TContent ID="body">
2
 
3
<h1>TCompareValidator Samples</h1>
4
<p><strong>Note:</strong> TCompareValidator will start
5
to validate only if both inputs are not empty.</p>
6
 
7
<table class="sampletable">
8
 
9
<tr>
10
<td class="samplenote">
11
Compare validator with default settings:
12
</td>
13
<td class="sampleaction">
14
<com:TTextBox ID="TextBox1" Text="a1" />
15
<com:TTextBox ID="TextBox11" Text="a2"/>
16
<com:TCompareValidator
17
	ValidationGroup="Group1"
18
	ControlToValidate="TextBox1"
19
	ControlToCompare="TextBox11"
20
	Text="The two textboxes must have the same value." />
21
<com:TButton Text="Submit" ValidationGroup="Group1" />
22
</td>
23
</tr>
24
 
25
<tr>
26
<td class="samplenote">
27
Compare validator with client-side validation disabled:
28
</td>
29
<td class="sampleaction">
30
<com:TTextBox ID="TextBox2" Text="b1"/>
31
<com:TTextBox ID="TextBox22" Text="b2" />
32
<com:TCompareValidator
33
	ValidationGroup="Group2"
34
	EnableClientScript="false"
35
	ControlToValidate="TextBox2"
36
	ControlToCompare="TextBox22"
37
	Text="The two textboxes must have the same value." />
38
<com:TButton Text="Submit" ValidationGroup="Group2" />
39
</td>
40
</tr>
41
 
42
<tr>
43
<td class="samplenote">
44
Comparing with a constant value:
45
</td>
46
<td class="sampleaction">
47
<com:TTextBox ID="TextBox3" Text="a" />
48
<com:TCompareValidator
49
	ValidationGroup="Group3"
50
	ControlToValidate="TextBox3"
51
	ValueToCompare="test"
52
	Text="You must enter 'test'." />
53
<com:TButton Text="Submit" ValidationGroup="Group3" />
54
</td>
55
</tr>
56
 
57
<tr>
58
<td class="samplenote">
59
Comparing with an integer:
60
</td>
61
<td class="sampleaction">
62
<com:TTextBox ID="TextBox4" Text="0" />
63
<com:TCompareValidator
64
	ValidationGroup="Group4"
65
	ControlToValidate="TextBox4"
66
	ValueToCompare="100"
67
	DataType="Integer"
68
	Operator="GreaterThan"
69
	Text="You must enter an integer greater than 100." />
70
<com:TButton Text="Submit" ValidationGroup="Group4" />
71
</td>
72
</tr>
73
 
74
</table>
75
 
76
<div class="last-modified">$Id: Home.page 1650 2007-01-24 06:55:32Z wei $</div></com:TContent>