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 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="BaseValidator" FullName="System.Web.UI.WebControls.BaseValidator">
<TypeSignature Language="C#" Maintainer="auto" Value="public abstract class BaseValidator : System.Web.UI.WebControls.Label, System.Web.UI.IValidator" />
<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.Label</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IValidator</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.WebControls.BaseValidatorDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultProperty("ErrorMessage")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.UI.WebControls.BaseValidator" /> class provides the core implementation for all validation controls. Validation controls are used to validate user input in an associated input control. When the user enters a value that fails validation, the validation control displays an error message. Because a validation control is separated from the input control, you can position the error message anywhere on the page relative to the input control. ASP.NET provides several validation controls that perform specific types of validation. The following table describes these controls.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Validation control</para>
</term>
<description>
<para>Description</para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="T:System.Web.UI.WebControls.CompareValidator" />
</para>
</term>
<description>
<para>Validates a value against the value entered into another input control, against a constant value, or against a proper data type by setting the <see cref="P:System.Web.UI.WebControls.CompareValidator.Operator" /> property to <see cref="F:System.Web.UI.WebControls.ValidationCompareOperator.DataTypeCheck" />.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="T:System.Web.UI.WebControls.CustomValidator" />
</para>
</term>
<description>
<para>Validates a value using a user-provided custom validation routine.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="T:System.Web.UI.WebControls.RangeValidator" />
</para>
</term>
<description>
<para>Validates whether a value is within a range of values.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="T:System.Web.UI.WebControls.RegularExpressionValidator" />
</para>
</term>
<description>
<para>Validates a value using a regular expression.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="T:System.Web.UI.WebControls.RequiredFieldValidator" />
</para>
</term>
<description>
<para>Validates that a value was entered in a required field.</para>
</description>
</item>
</list>
<para>Validation controls always validate the associated input control on the server. Validation controls also have complete client-side implementation that allows script-enabled browsers (such as Microsoft Internet Explorer version 4.0 and later) to perform validation on the client. Client-side validation enhances the validation process by checking user input before it is sent to the server. This allows errors to be detected on the client before the form is submitted, avoiding the round trip of information necessary for server-side validation.</para>
<para>Multiple validation controls can be used with an individual input control to validate different criteria. For example, you can apply multiple validation controls on a <see cref="T:System.Web.UI.WebControls.TextBox" /> control. You can use a <see cref="T:System.Web.UI.WebControls.RangeValidator" /> control to ensure that the value entered in the <see cref="T:System.Web.UI.WebControls.TextBox" /> control is within a set range, and a <see cref="T:System.Web.UI.WebControls.RequiredFieldValidator" /> control to ensure that the user enters a value.</para>
<para>ASP.NET provides many controls that have the ability to post back to the server. When one of these controls has its CausesValidation property set to true, validation is performed when the control posts back to the server. The following controls have the ability to post back to the server:</para>
<list type="bullet">
<item>
<para>
<see cref="T:System.Web.UI.WebControls.BulletedList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.Button" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.CheckBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.CheckBoxList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.DropDownList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputImage" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ImageButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.LinkButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ListBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.RadioButtonList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.TextBox" />
</para>
</item>
</list>
<block subset="none" type="note">
<para>Some of these controls post back to the server only when the AutoPostBack property is set to true.</para>
</block>
<para>These controls each have a ValidationGroup property that, when set, validates only the validation controls within the specified group when the control triggers a post back to the server. To group validation controls, set the <see cref="P:System.Web.UI.WebControls.BaseValidator.ValidationGroup" /> property of each validation control to the same value.</para>
<para>To associate an input control with a validation control, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property. To specify the text to display in a validation control when validation fails, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property. You can also display a summary of all controls that fail validation in the page by using a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control. To specify the text to display in a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property.</para>
<block subset="none" type="note">
<para>If you set the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property without setting the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property, the value of the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property is also displayed in the validation control.</para>
</block>
<para>When using validator controls, you should always check the results of server-side validation before performing any processing. After a postback but before your event methods are called, the page calls the validator controls and aggregates their results into the <see cref="P:System.Web.UI.Page.IsValid" /> property. (You can also call the validator controls explicitly using the Validate method.) In your own code, you should check that the <see cref="P:System.Web.UI.Page.IsValid" /> property returns true before processing input. Even though script-enabled browsers might prevent a postback from occurring on the client if a validation check has failed, you should always also check <see cref="P:System.Web.UI.Page.IsValid" /> in server code before processing validated data.</para>
<para>You can also manually perform validation. To validate all validation controls on the page, use the <see cref="M:System.Web.UI.Page.Validate" /> method. Individual validation controls can be validated by using the <see cref="M:System.Web.UI.WebControls.BaseValidator.Validate" /> method of the control.</para>
<block subset="none" type="note">
<para>If you use the <see cref="P:System.Web.UI.Page.IsValid" /> property in a Page_Load method, you must first explicitly call the <see cref="M:System.Web.UI.Page.Validate" /> method. Because validation occurs after the <see cref="E:System.Web.UI.Control.Load" /> event for the page, but before the event handler for the Click or Command events, the <see cref="P:System.Web.UI.Page.IsValid" /> property is not updated until the <see cref="M:System.Web.UI.Page.Validate" /> method is called. As an alternative, you can place your code in the event handler for the Click or Command event instead of the Page_Load method.</para>
</block>
<para>Not all Web server controls support validation controls. The standard controls that can be validated with a validation control are:</para>
<list type="bullet">
<item>
<para>
<see cref="T:System.Web.UI.WebControls.DropDownList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.FileUpload" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ListBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.RadioButtonList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.TextBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputFile" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputPassword" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputText" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlSelect" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlTextArea" />
</para>
</item>
</list>
<block subset="none" type="note">
<para>For an input control to be validated, the <see cref="T:System.Web.UI.ValidationPropertyAttribute" /> attribute must be applied to the control.</para>
</block>
<block subset="none" type="note">
<para>When you use validator controls that derive from <see cref="T:System.Web.UI.WebControls.BaseValidator" /> 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>When validation fails, you can set the focus on the associated input control by setting the <see cref="P:System.Web.UI.WebControls.BaseValidator.SetFocusOnError" /> property to true.</para>
<para>For a list of initial property values for an instance of <see cref="T:System.Web.UI.WebControls.BaseValidator" />, see the <see cref="M:System.Web.UI.WebControls.BaseValidator.#ctor" /> constructor.</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>Serves as the abstract base class for validation controls.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected BaseValidator ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This constructor is not called directly. Validation controls that inherit from this class can call this constructor from their own constructors to initialize the base properties.</para>
<para>The following table shows initial property values for an instance of <see cref="T:System.Web.UI.WebControls.BaseValidator" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Property </para>
</term>
<description>
<para>Initial value </para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" />
</para>
</term>
<description>
<para>true </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.BaseValidator.ForeColor" />
</para>
</term>
<description>
<para>
<see cref="P:System.Drawing.Color.Red" />
</para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.BaseValidator.PropertiesValid" />
</para>
</term>
<description>
<para>true</para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.BaseValidator.RenderUplevel" />
</para>
</term>
<description>
<para>false</para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.BaseValidator" /> 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 writer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.AddAttributesToRender(System.Web.UI.HtmlTextWriter)" /> method is used to render the attributes of the control in the HTML tag for the control. This method is typically overridden by control developers in derived classes to insert the appropriate attributes and styles to the <see cref="T:System.Web.UI.HtmlTextWriter" /> output stream for a control.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds the HTML attributes and styles that need to be rendered for the control to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> object.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="AssociatedControlID">
<MemberSignature Language="C#" Value="public override string AssociatedControlID { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This property is not supported. This property is supported only on the base <see cref="T:System.Web.UI.WebControls.Label" /> class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This property is not supported.</para>
</summary>
</Docs>
</Member>
<Member MemberName="CheckControlValidationProperty">
<MemberSignature Language="C#" Value="protected void CheckControlValidationProperty (string name, string propertyName);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="propertyName" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(System.String,System.String)" /> method is a helper method used primarily by the <see cref="M:System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid" /> method to verify whether the specified control is on the page and contains validation properties. This method does not return a value to report the result. Instead, it throws an exception when verification fails.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Verifies whether the specified control is on the page and contains validation properties.</para>
</summary>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The control to verify. </param>
<param name="propertyName">
<attribution license="cc4" from="Microsoft" modified="false" />Additional text to describe the source of the exception, if an exception is thrown from using this method. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ControlPropertiesValid">
<MemberSignature Language="C#" Value="protected virtual bool ControlPropertiesValid ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid" /> method is a helper method used primarily by the <see cref="P:System.Web.UI.WebControls.BaseValidator.PropertiesValid" /> property to determine whether the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property contains a valid input control. To be a valid input control, the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property must be set to some value and that value must be a control on the page that supports validation.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Determines whether the control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property is a valid control.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the control specified by <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> is a valid control; otherwise, false.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ControlToValidate">
<MemberSignature Language="C#" Value="public string ControlToValidate { 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.BaseValidator.ControlToValidate" /> property to specify the input control to validate. This property must be set to the ID of an input control for all validation controls except the <see cref="T:System.Web.UI.WebControls.CustomValidator" /> control, which can be left blank. If you do not specify a valid input control, an exception will be thrown when the page is rendered. The ID must refer to a control within the same container as the validation control. It must be in the same page or user control, or it must be in the same template of a templated control.</para>
<para>The standard controls that can be validated are:</para>
<list type="bullet">
<item>
<para>
<see cref="T:System.Web.UI.WebControls.DropDownList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.FileUpload" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ListBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.RadioButtonList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.TextBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputFile" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputPassword" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputText" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlSelect" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlTextArea" />
</para>
</item>
</list>
<block subset="none" type="note">
<para>For an input control to be validated, the <see cref="T:System.Web.UI.ValidationPropertyAttribute" /> attribute must be applied to the control.</para>
</block>
<para>All validation controls, except the <see cref="T:System.Web.UI.WebControls.RequiredFieldValidator" /> control, will pass validation if the input control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property contains no text. If you are using a <see cref="T:System.Web.UI.WebControls.CustomValidator" /> control, the client-side and server-side validation functions are not called either.</para>
<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 validate.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.ValidatedControlConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.IDReferenceProperty(typeof(System.Web.UI.Control))</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="DetermineRenderUplevel">
<MemberSignature Language="C#" Value="protected virtual bool DetermineRenderUplevel ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.DetermineRenderUplevel" /> method is a helper function that is used primarily by the <see cref="P:System.Web.UI.WebControls.BaseValidator.RenderUplevel" /> property to determine whether the client's browser supports client script. For this property to return true, the following conditions must be true:</para>
<list type="bullet">
<item>
<para>The browser has client script enabled.</para>
</item>
<item>
<para>The <see cref="P:System.Web.HttpBrowserCapabilitiesBase.W3CDomVersion" /> property of the <see cref="T:System.Web.HttpBrowserCapabilitiesBase" /> object that is stored in the <see cref="P:System.Web.HttpRequest.Browser" /> property is 1 or later. </para>
</item>
<item>
<para>The <see cref="P:System.Web.Configuration.HttpCapabilitiesBase.EcmaScriptVersion" /> property of the <see cref="T:System.Web.HttpBrowserCapabilitiesBase" /> object that is stored in the <see cref="P:System.Web.HttpRequest.Browser" /> property is 1.2 or later.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Determines whether the validation control can perform client-side validation.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the validation control can perform client-side validation; otherwise, false.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Display">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ValidatorDisplay Display { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ValidatorDisplay</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'ValidatorDisplay'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.Display" /> property to specify the display behavior of the error message in the validation control. The following table lists the different values that can be used.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Display behavior </para>
</term>
<description>
<para>Description </para>
</description>
</item>
</listheader>
<item>
<term>
<para>None </para>
</term>
<description>
<para>The validation message is never displayed inline. </para>
</description>
</item>
<item>
<term>
<para>Static </para>
</term>
<description>
<para>Space for the validation message is allocated in the page layout. </para>
</description>
</item>
<item>
<term>
<para>Dynamic </para>
</term>
<description>
<para>Space for the validation message is dynamically added to the page if validation fails. </para>
</description>
</item>
</list>
<block subset="none" type="note">
<para>The display behavior depends on whether client-side validation is performed. If client-side validation is not active (because the browser does not support it or because it has been disabled by using the <see cref="P:System.Web.UI.Page.ClientTarget" /> page directive or <see cref="P:System.Web.UI.WebControls.BaseValidator.EnableClientScript" /> property), ValidatorDisplay.Static and ValidatorDisplay.Dynamic behave the same way: the error message takes up space only if it is displayed. The ability to dynamically allocate space for the message when it is not being displayed (ValidatorDisplay.Dynamic) only works with client-side validation.</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 display behavior of the error message in a validation control.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(System.Web.UI.WebControls.ValidatorDisplay.Static)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="EnableClientScript">
<MemberSignature Language="C#" Value="public bool EnableClientScript { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'bool'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.EnableClientScript" /> property to specify whether client-side validation is enabled.</para>
<para>Validation controls always perform validation on the server. They also have complete client-side implementation that allows DHTML-supported browsers (such as Microsoft Internet Explorer 4.0 and later) to perform validation on the client. Client-side validation enhances the validation process by checking user input before it is sent to the server. This allows errors to be detected on the client before the form is submitted, avoiding the round trip of information necessary for server-side validation.</para>
<para>By default, this value is set to true, which enables client-side validation if the browser supports it. You can disable client-side validation on a control-by-control basis. This is useful if dynamic updating on the client creates problems with the layout of the page, or if you want to execute some server code before validation takes place.</para>
<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 value indicating whether client-side validation is enabled.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="Enabled">
<MemberSignature Language="C#" Value="public override bool Enabled { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>a <see cref="T:System.Boolean" /></value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.Enabled" /> property to specify whether the validation control is enabled. You can disable the validation control by setting this property to false.</para>
<para>Setting either the <see cref="P:System.Web.UI.Control.Visible" /> or the <see cref="P:System.Web.UI.WebControls.BaseValidator.Enabled" /> property to false will prevent validation from being performed. This causes the <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property to always evaluate to true.</para>
<para>The <see cref="P:System.Web.UI.WebControls.BaseValidator.Enabled" /> property is slightly different from the <see cref="P:System.Web.UI.Control.Visible" /> property. If the <see cref="P:System.Web.UI.Control.Visible" /> property for a validation control is set to true, but the <see cref="P:System.Web.UI.WebControls.BaseValidator.Enabled" /> property is set to false, the validation control is still rendered for client-side validation, but in a disabled state. You can then re-enable the validation control on the client by using DHTML script.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a value that indicates whether the validation control is enabled.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ErrorMessage">
<MemberSignature Language="C#" Value="public string ErrorMessage { 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>When using a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property to specify the text to display in the <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control when validation fails for the current validation control. To specify the text to display in the validation control itself, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property.</para>
<block subset="none" type="note">
<para>If you set the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property without setting the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property, the value of the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property is also displayed in the validation control.</para>
</block>
<para>The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see <see cref="T:System.ComponentModel.LocalizableAttribute" /> and <format type="text/html"><a href="8ef3838e-9d05-4236-9dd0-ceecff9df80d">ASP.NET Globalization and Localization</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the text for the error message displayed in a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control when validation fails.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Localizable(true)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="EvaluateIsValid">
<MemberSignature Language="C#" Value="protected abstract bool EvaluateIsValid ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.EvaluateIsValid" /> method to determine whether the value in the input control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property is valid.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</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="ForeColor">
<MemberSignature Language="C#" Value="public override System.Drawing.Color ForeColor { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>a <see cref="T:System.Drawing.Color" /></value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ForeColor" /> property to specify a custom text color for the message displayed in the validation control when validation fails.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the color of the message displayed when validation fails.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "Red")</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="GetControlRenderID">
<MemberSignature Language="C#" Value="protected string GetControlRenderID (string name);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.GetControlRenderID(System.String)" /> method to get the client ID of the specified control. For more information, see <see cref="P:System.Web.UI.Control.ClientID" />.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the client ID of the specified control.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The client ID of the specified control.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the control to get the client ID from. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="GetControlValidationValue">
<MemberSignature Language="C#" Value="protected string GetControlValidationValue (string name);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.GetControlValidationValue(System.String)" /> method to get the value associated with the specified input control, regardless of the control type. For example, you can use this method to get the value in a <see cref="T:System.Web.UI.WebControls.TextBox" /> control, as well as the value of the selected item from a <see cref="T:System.Web.UI.WebControls.ListBox" /> control. If the specified control cannot be found, null is returned.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the value associated with the specified input control.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value associated with the specified input control.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the input control to get the value from. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="GetValidationProperty">
<MemberSignature Language="C#" Value="public static System.ComponentModel.PropertyDescriptor GetValidationProperty (object o);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.ComponentModel.PropertyDescriptor</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="o" Type="System.Object" />
</Parameters>
<Docs>
<param name="o">a <see cref="T:System.Object" /></param>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.GetValidationProperty(System.Object)" /> method is a helper function that gets the validation property of the specified input control.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Determines the validation property of a control (if it exists).</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="T:System.ComponentModel.PropertyDescriptor" /> that contains the validation property of the control.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public bool IsValid { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>To be added: an object of type 'bool'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property to determine whether the associated input control passes validation.</para>
<block subset="none" type="note">
<para>Because the default value of this property is true, it will return true if you query this property before validation is performed. For example, this might occur if you attempt to use this property in the <see cref="E:System.Web.UI.Control.Load" /> event of a page.</para>
</block>
<para>The <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property is evaluated only when the <see cref="M:System.Web.UI.WebControls.BaseValidator.Validate" /> method is called. You can call the <see cref="M:System.Web.UI.WebControls.BaseValidator.Validate" /> method for each validation control on the page individually, or call all of them at once by using the <see cref="M:System.Web.UI.Page.Validate" /> method. Button controls with their CausesValidation property set to true will also call the <see cref="M:System.Web.UI.Page.Validate" /> method.</para>
<block subset="none" type="note">
<para>It is possible to change the value of this property manually after validation has taken place. This allows you to override the validation result, if necessary.</para>
</block>
<para>The <see cref="P:System.Web.UI.Page.IsValid" /> property for the page is set to true only if the <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property for each validation control on the page is also set to true.</para>
<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 value that indicates whether the associated input control passes validation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="OnInit">
<MemberSignature Language="C#" Value="protected override void OnInit (EventArgs e);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>After this method calls the base control's <see cref="M:System.Web.UI.Control.OnInit(System.EventArgs)" /> method, it sets the <see cref="P:System.Web.UI.WebControls.WebControl.ForeColor" /> property to <see cref="P:System.Drawing.Color.Red" /> if the following conditions are true:</para>
<list type="bullet">
<item>
<para>The <see cref="P:System.Web.UI.WebControls.WebControl.ForeColor" /> property is not already set.</para>
</item>
<item>
<para>The <see cref="P:System.Web.UI.Control.RenderingCompatibility" /> property indicates an ASP.NET version earlier than 4.0. By default, validator controls in ASP.NETÂ 4 and later versions do not display errors in red. For information about how to control the visual appearance of validator controls, see <format type="text/html"><a href="4ad3dacb-89e0-4cee-89ac-40a3f2a85461">Validating User Input in ASP.NET Web Pages</a></format>.</para>
</item>
</list>
<para>This method also registers the validation control on the page.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raises the <see cref="E:System.Web.UI.Control.Init" /> event.</para>
</summary>
<param name="e">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.EventArgs" /> that contains the event data. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="OnPreRender">
<MemberSignature Language="C#" Value="protected override void OnPreRender (EventArgs e);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method has been overridden to check the client browser and configure the validation control for compatibility prior to rendering.</para>
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="f2adaf01-1ed1-42e1-8c31-8d467e7e0ee2">Raising an Event</a></format>.</para>
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.OnPreRender(System.EventArgs)" /> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raises the <see cref="E:System.Web.UI.Control.PreRender" /> event.</para>
</summary>
<param name="e">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.EventArgs" /> that contains the event data.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="OnUnload">
<MemberSignature Language="C#" Value="protected override void OnUnload (EventArgs e);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method has been overridden to unregister the validation control on the page.</para>
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="f2adaf01-1ed1-42e1-8c31-8d467e7e0ee2">Raising an Event</a></format>.</para>
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.OnUnload(System.EventArgs)" /> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raises the <see cref="E:System.Web.UI.Control.Unload" /> event.</para>
</summary>
<param name="e">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.EventArgs" /> that contains the event data.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="PropertiesValid">
<MemberSignature Language="C#" Value="protected bool PropertiesValid { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'bool'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.PropertiesValid" /> property to determine whether the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property contains a valid input control. To be a valid input control, the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property must be set to a control on the page.</para>
<block subset="none" type="note">
<para>This property is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value that indicates whether the control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property is a valid control.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RegisterValidatorCommonScript">
<MemberSignature Language="C#" Value="protected void RegisterValidatorCommonScript ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.RegisterValidatorCommonScript" /> method to register code on the page to perform client-side validation.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Registers code on the page for client-side validation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RegisterValidatorDeclaration">
<MemberSignature Language="C#" Value="protected virtual void RegisterValidatorDeclaration ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.RegisterValidatorDeclaration" /> method to register an ECMAScript array declaration using the array name Page_Validators.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Registers an ECMAScript array declaration using the array name Page_Validators.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Render">
<MemberSignature Language="C#" Value="protected override void Render (System.Web.UI.HtmlTextWriter writer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.BaseValidator.Render(System.Web.UI.HtmlTextWriter)" /> method is used to generate the HTML markup for a validation control.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Displays the control on the client.</para>
</summary>
<param name="writer">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Web.UI.HtmlTextWriter" /> that contains the output stream for rendering on the client. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="RenderUplevel">
<MemberSignature Language="C#" Value="protected bool RenderUplevel { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'bool'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.RenderUplevel" /> property to determine whether the client's browser supports "uplevel" rendering. For a browser to support "uplevel" rendering, it must support Microsoft Internet Explorer Document Object Model (DOM) version 4 or later and ECMAScript version 1.2 or later.</para>
<block subset="none" type="note">
<para>This property is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value that indicates whether the client's browser supports "uplevel" rendering.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="SetFocusOnError">
<MemberSignature Language="C#" Value="public bool SetFocusOnError { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.SetFocusOnError" /> property to specify whether focus is automatically set to the control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property when this validation control fails. This allows the user to quickly update the appropriate control.</para>
<para>If multiple validation controls fail and this property is set to true, the control specified in the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property for the first validation control receives focus.</para>
<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 value that indicates whether focus is set to the control specified by the <see cref="P:System.Web.UI.WebControls.BaseValidator.ControlToValidate" /> property when validation fails.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Text">
<MemberSignature Language="C#" Value="public override string Text { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property to specify the text to display in a validation control when validation fails. You can also display a summary of all controls that fail validation in the page by using a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control. To specify the text to display in a <see cref="T:System.Web.UI.WebControls.ValidationSummary" /> control, use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property.</para>
<block subset="none" type="note">
<para>If you set the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property without setting the <see cref="P:System.Web.UI.WebControls.BaseValidator.Text" /> property, the value of the <see cref="P:System.Web.UI.WebControls.BaseValidator.ErrorMessage" /> property is also displayed in the validation control.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the text displayed in the validation control when validation fails.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Validate">
<MemberSignature Language="C#" Value="public void Validate ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.Web.UI.WebControls.BaseValidator.Validate" /> method to perform validation on the associated input control. This method allows you to programmatically perform validation on the input control. The <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property is automatically updated with the validation results.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Performs validation on the associated input control and updates the <see cref="P:System.Web.UI.WebControls.BaseValidator.IsValid" /> property.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ValidationGroup">
<MemberSignature Language="C#" Value="public virtual string ValidationGroup { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>ASP.NET provides many controls that have the ability to post back to the server. When one of these controls has its CausesValidation property set to true, validation is performed when the control posts back to server. The following controls have the ability to post back to the server:</para>
<list type="bullet">
<item>
<para>
<see cref="T:System.Web.UI.WebControls.BulletedList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.Button" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.CheckBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.CheckBoxList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.DropDownList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.HtmlControls.HtmlInputImage" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ImageButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.LinkButton" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.ListBox" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.RadioButtonList" />
</para>
</item>
<item>
<para>
<see cref="T:System.Web.UI.WebControls.TextBox" />
</para>
</item>
</list>
<block subset="none" type="note">
<para>Some of these controls post back to the server only when the AutoPostBack property is set to true.</para>
</block>
<para>These controls each have a ValidationGroup property that, when set, validates only the validation controls within the specified group when the control triggers a post back to the server. Use the <see cref="P:System.Web.UI.WebControls.BaseValidator.ValidationGroup" /> property to assign a validation control to a validation group. The <see cref="T:System.Web.UI.Page" /> class also exposes a <see cref="M:System.Web.UI.Page.GetValidators(System.String)" /> method and a <see cref="M:System.Web.UI.Page.Validate(System.String)" /> method that accept a <see cref="P:System.Web.UI.WebControls.BaseValidator.ValidationGroup" /> input parameter.</para>
<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 name of the validation group to which this validation control belongs.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|