asp.net.ph

CustomValidator.ClientValidationFunction Property

System.Web.UI.WebControls Namespace   CustomValidator Class


Sets or retrieves the custom client script function used for validation.

Syntax


Inline <asp:customvalidator clientvalidationfunction = strScriptName ... >
Script CustomValidator.ClientValidationFunction = strScriptName

Property Value


strScriptName String specifying the name of the custom client script used for validation.

The property is read/write with no default value.

Remarks

Set this property to the name of the function that performs the client-side validation.

Because the client validation function runs on the target browser, the function must be written using a scripting language supported by the browser, such as JScript or VBScript.

Example

The following example demonstrates how to use the ClientValidationFunction property to specify the name of the function that performs client-side validation. The validation function checks for even numbers.

<asp:customvalidator id = "CustomValidator1" runat = "server"
   controltovalidate = "myTextBox"
   clientvalidationfunction = "ClientValidate"
   onServerValidate = "ServerValidate"
   display = "Static" />

 Show me 

See Also

CustomValidator Members   Validating with a Custom Function Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph