The validator controls presented here are simplified versions of the validator controls that ship with the .NET Framework. Unlike the validator controls in the SDK, which work only with Internet Explorer, these controls comply with the World Wide Web Consortium Document Object Model Level 1 specification (W3C DOM Level 1) and support a number of browsers such as Internet Explorer 5, Netscape Navigator 6, and Opera 5.
The following list describes the sources of the different pieces of the sample:
To compile and deploy this sample
- Create a virtual rooted Web application directory and copy all the files into that directory. Name the files as follows.
- In the Web application directory that you created, create a batch file that contains the following commands. (Save the batch file with the extension .bat, such as
BuildFile.bat).
if not exist .\script md .\script
if not exist .\bin md .\bin
copy DomValidation.js .\script\DomValidation.js
echo Copied File.
csc /t:library /out:.\bin\DomValidators.dll /r:System.dll /r:System.Web.dll /r:System.Drawing.dll BaseDomValidator.cs RegexDomValidator.cs RequiredDomValidator.cs
echo Built Library.
[Visual Basic]
if not exist .\script md .\script
if not exist .\bin md .\bin
copy DomValidation.js .\script\DomValidation.js
echo Copied File.
vbc /t:library /out:.\bin\DomValidators.dll /r:System.dll /r:System.Web.dll /r:System.Drawing.dll BaseDomValidator.vb RegexDomValidator.vb RequiredDomValidator.vb
echo Built Library.
- Execute the batch file you created in step 2. If your build file is named BuildFile.bat, execute the following command from the Web application directory.
See Also
Base Validator Control Sample | Required Field Validator Control Sample | Regular Expression Validator Control Sample | Script Library for Validator Sample | Configuration File for Validator Sample | Test Page for Validator Sample | Client-Side Functionality in a Server Control