This function is used to add the error code to the Validation Control.
Syntax:
AddError(ControlName,ErrorCode,ErrorMessage)
where
ControlName is the name of Validation Control.
ErrorCode is the unique code user will have to specify to be added to the validation control. The code can be integer or string.
ErrorMessage is the message to be displayed.
Example:
AddError( ValidationControl1,”01″,”error”)