1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="CompareValidator" FullName="System.Web.UI.WebControls.CompareValidator">
<TypeSignature Language="C#" Maintainer="auto" Value="public class CompareValidator : System.Web.UI.WebControls.BaseCompareValidator" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Web.UI.WebControls.BaseCompareValidator</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Web.UI.ToolboxData("<{0}:CompareValidator runat="server" ErrorMessage="CompareValidator"></{0}:CompareValidator>")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="T:System.Web.UI.WebControls.CompareValidator" /> control to compare the value entered by the user in an input control, such as a <see cref="T:System.Web.UI.WebControls.TextBox" /> control, with the value entered in another input control or a constant value. The <see cref="T:System.Web.UI.WebControls.CompareValidator" /> control passes validation if the value of the input control matches the criteria specified by the <see cref="P:System.Web.UI.WebControls.CompareValidator.Operator" />, <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" />, and/or <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> properties. </para>
<para>You can also use the <see cref="T:System.Web.UI.WebControls.CompareValidator" /> control to indicate whether the value entered in an input control can be converted to the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property.</para>
<para>Specify the input control to validate by setting the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property. If you want to compare a specific input control with another input control, set the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property to specify the control to compare with.</para>
<block subset="none" type="note">
<para>If the value entered in the input control specified by the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property cannot be converted to the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property, but the value entered in the input control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property can be converted, the input control being validated is considered valid. Therefore, you should also place a <see cref="T:System.Web.UI.WebControls.CompareValidator" /> or <see cref="T:System.Web.UI.WebControls.RangeValidator" /> control on the input control specified by the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property.</para>
</block>
<para>Instead of comparing the value of an input control with another input control, you can compare the value of an input control to a constant value. Specify the constant value to compare with by setting the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property.</para>
<block subset="none" type="note">
<para>If the value specified by the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property cannot be converted to the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property, an exception is thrown. Be sure to check the data type of a value before programmatically assigning it to the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property.</para>
</block>
<block subset="none" type="note">
<para>Do not set both the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> and the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property at the same time. You can either compare the value of an input control to another input control, or to a constant value. If both properties are set, the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property takes precedence.</para>
</block>
<para>Use the <see cref="P:System.Web.UI.WebControls.CompareValidator.Operator" /> property to specify the type of comparison to perform, such as greater than, equal to, and so on. If you set the <see cref="P:System.Web.UI.WebControls.CompareValidator.Operator" /> property to ValidationCompareOperator.DataTypeCheck, the <see cref="T:System.Web.UI.WebControls.CompareValidator" /> control ignores the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> and <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> properties and simply indicates whether the value entered in the input control can be converted to the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property.</para>
<para>The <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property is used to specify the data type of both comparison values. Both values are automatically converted to this data type before the comparison operation is performed. </para>
<block subset="none" type="note">
<para>When the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property is set to <see cref="F:System.Web.UI.WebControls.ValidationDataType.Date" /> and the current calendar type is non-Gregorian, the validator performs server-side validation only. The validator client script supports only Gregorian calendars.</para>
</block>
<para>The following table lists the various data types that can be compared.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Data type </para>
</term>
<description>
<para>Description </para>
</description>
</item>
</listheader>
<item>
<term>
<para>String </para>
</term>
<description>
<para>A string data type. </para>
</description>
</item>
<item>
<term>
<para>Integer </para>
</term>
<description>
<para>A 32-bit signed integer data type. </para>
</description>
</item>
<item>
<term>
<para>Double </para>
</term>
<description>
<para>A double-precision floating-point number data type. </para>
</description>
</item>
<item>
<term>
<para>Date </para>
</term>
<description>
<para>A date data type. </para>
</description>
</item>
<item>
<term>
<para>Currency </para>
</term>
<description>
<para>A decimal data type that can contain currency symbols. </para>
</description>
</item>
</list>
<block subset="none" type="note">
<para>If the input control is empty, no validation functions are called and validation succeeds. Use a <see cref="T:System.Web.UI.WebControls.RequiredFieldValidator" /> control to require the user to enter data in the input control.</para>
</block>
<block subset="none" type="note">
<para>When you use the <see cref="T:System.Web.UI.WebControls.CompareValidator" /> control inside an <see cref="T:System.Web.UI.UpdatePanel" /> control, make sure that the validator control and the control it is associated with are in the same panel. For more information about using the <see cref="T:System.Web.UI.UpdatePanel" /> control for partial-page updates, see <format type="text/html"><a href="5c12736d-d9e9-464a-9388-3fe0f9f49e49">Partial-Page Rendering Overview</a></format>.</para>
</block>
<para>For more information about validation controls, see <see cref="T:System.Web.UI.WebControls.BaseValidator" />.</para>
<format type="text/html">
<h2>Accessibility</h2>
</format>
<para>For information about how to configure this control so that it generates markup that conforms to accessibility standards, see <format type="text/html"><a href="7e3ce9c4-6b7d-4fb1-94b5-72cf2a44fe13">Accessibility in Visual Studio 2010 and ASP.NET 4</a></format> and <format type="text/html"><a href="847a37e3-ce20-41da-b0d3-7dfb0fdae9a0">ASP.NET Controls and Accessibility</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Compares the value entered by the user in an input control with the value entered in another input control, or with a constant value.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CompareValidator ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The default constructor initializes any fields to their default values.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.CompareValidator" /> class. </para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="AddAttributesToRender">
<MemberSignature Language="C#" Value="protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter w);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="w" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="w">To be added.</param>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds the attributes of this control to the output stream for rendering on the client.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ControlPropertiesValid">
<MemberSignature Language="C#" Value="protected override bool ControlPropertiesValid ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Checks the properties of the control for valid values.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the control properties are valid; otherwise, false.</para>
</returns>
</Docs>
</Member>
<Member MemberName="ControlToCompare">
<MemberSignature Language="C#" Value="public string ControlToCompare { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'string'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property to specify an input control, such as a <see cref="T:System.Web.UI.WebControls.TextBox" /> control, to compare with the input control being validated. If the input control specified by this property is not a control on the page, an exception is thrown.</para>
<block subset="none" type="note">
<para>Do not set both the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> and the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property at the same time. You can either compare the value of an input control to another input control, or to a constant value. If both properties are set, the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property takes precedence.</para>
</block>
<para>For more information, see <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" />.</para>
<block subset="none" type="note">
<para> If the control to compare is hidden or is inside a container (such as a <see cref="T:System.Web.UI.WebControls.Panel" /> control) that is not visible, the validator performs server-side validation only. The validator client script supports only visible controls.</para>
</block>
<para>This property cannot be set by themes or style sheet themes. For more information, see <see cref="T:System.Web.UI.ThemeableAttribute" /> and <format type="text/html"><a href="5df3ebbd-d46c-4502-9406-02f9df4ef2c3">ASP.NET Themes Overview</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the input control to compare with the input control being validated.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.ValidatedControlConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="EvaluateIsValid">
<MemberSignature Language="C#" Value="protected override bool EvaluateIsValid ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When overridden in a derived class, this method contains the code to determine whether the value in the input control is valid.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the value in the input control is valid; otherwise, false.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Operator">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ValidationCompareOperator Operator { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ValidationCompareOperator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'ValidationCompareOperator'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.CompareValidator.Operator" /> property to specify the comparison operation to perform. The following table lists the comparison operations that are possible.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Operation </para>
</term>
<description>
<para>Description </para>
</description>
</item>
</listheader>
<item>
<term>
<para>Equal </para>
</term>
<description>
<para>A comparison for equality between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>NotEqual </para>
</term>
<description>
<para>A comparison for inequality between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>GreaterThan </para>
</term>
<description>
<para>A comparison for greater than between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>GreaterThanEqual </para>
</term>
<description>
<para>A comparison for greater than or equal to between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>LessThan </para>
</term>
<description>
<para>A comparison for less than between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>LessThanEqual </para>
</term>
<description>
<para>A comparison for less than or equal to between the values of the input control being validated and another control, or a constant value. </para>
</description>
</item>
<item>
<term>
<para>DataTypeCheck </para>
</term>
<description>
<para>A data type comparison of the value entered in the input control being validated and the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property. Validation fails if the value cannot be converted to the specified data type.</para>
<block subset="none" type="note">
<para>The <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> and <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> properties are ignored when this operator is used. </para>
</block>
</description>
</item>
</list>
<para>This property cannot be set by themes or style sheet themes. For more information, see <see cref="T:System.Web.UI.ThemeableAttribute" /> and <format type="text/html"><a href="5df3ebbd-d46c-4502-9406-02f9df4ef2c3">ASP.NET Themes Overview</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the comparison operation to perform.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(System.Web.UI.WebControls.ValidationCompareOperator.Equal)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="ValueToCompare">
<MemberSignature Language="C#" Value="public string ValueToCompare { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'string'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property to specify a constant value to compare with the value entered by the user in the input control being validated. If the constant value specified by this property fails to convert to the data type specified by the <see cref="P:System.Web.UI.WebControls.BaseCompareValidator.Type" /> property, an exception is thrown.</para>
<block subset="none" type="note">
<para>Do not set both the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> and the <see cref="P:System.Web.UI.WebControls.CompareValidator.ValueToCompare" /> property at the same time. You can either compare the value of an input control to another input control, or to a constant value. If both properties are set, the <see cref="P:System.Web.UI.WebControls.CompareValidator.ControlToCompare" /> property takes precedence.</para>
</block>
<para>This property cannot be set by themes or style sheet themes. For more information, see <see cref="T:System.Web.UI.ThemeableAttribute" /> and <format type="text/html"><a href="5df3ebbd-d46c-4502-9406-02f9df4ef2c3">ASP.NET Themes Overview</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a constant value to compare with the value entered by the user in the input control being validated.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
</Attributes>
</Member>
</Members>
</Type>
|