CustomValidator is a user-defined verification control that responds to user-defined verification. It can be a JS client function, or a server verification function written in the background code. The following describes the background color of CustomValidator. ClientValidationFunction specifies the name of the custom client script function used for verification. Note: The script must be written in a language supported by the browser. For example, if VBScript or JScript uses VBScript, the function must be in the form: Sub FunctionName (source, arguments) using JScript, the Function must be in the form: Function FunctionName (source, arguments) ControlToValidate id of the input control to be verified. Display verifies the Display behavior of error messages in the control. Valid values: · None-the verification message is never displayed inline. · Static-allocate space in the page layout for displaying verification messages. · Dynamic-If verification fails, the space used to display verification messages is dynamically added to the page. A boolean value of EnableClientScript, indicating whether to enable client verification. A boolean value of Enabled, indicating whether to enable the verification control. The error message text displayed in the ValidationSummary control when ErrorMessage verification fails. Note: If the ErrorMessage attribute is set but the Text attribute is not set, the value of the ErrorMessage attribute is also displayed in the verification control. The foreground color of the ForeColor control. The unique id of the id control. A boolean value of IsValid, indicating whether the associated input control has passed verification. OnServerValidate specifies the name of The Script Function executed on the server. Runat specifies that the control is a server control. Must be set to "server ". Text displayed when verification fails. Learn how to use CustomValidator [html] <% @ Page Language = "C #" AutoEventWireup = "true" Inherits = "Default2" Codebehind = "Default2.aspx. cs "%> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head runat =" server "> <title> Custom Controls </title> <script type =" text/javascript "language =" javascript "> function Clientv (s, e) {e. isValid = (e. value = "client ");} </script>