Iterating through the Errors

The Errors class is a standard custom collection, so it is relatively easy to iterate through the errors and see what's going on, the code below shows an example of this.

Example 2.10. Iterating through the errors collection

    For i = 1 To hASPForm.Errors.Count
        response.write "Element : " & hASPForm.Errors(i).Element & "<br>"
        response.write "Description : " & hASPForm.Errors(i).Description & "<br>"
        response.write "Rule : " & hASPForm.Errors(i).Rule & "<br>"
        response.write "<hr>"        
    Next