ASPForms - Programmer's Guide


Table of Contents

Preface
1. Introduction To ASPForms
Prerequisites
Overview of ASPForms Object Model
2. ASPForms - A Sample Application
Overview
Creating An Instance Of ASPForm
Adding Elements To An ASPForm Object
A Sample HTML Form Page
Loading The Request Into Our ASPFormV1 Object
Dumping the current configuration and state
Creating Rulesets And Rules
Validating Data
Validation against an entire ruleset
Validating a single element
The IsValid And IsDirty Flags
A Note About The Errors Object
Looking At The Results Of Validation With The Errors Object
Iterating through the Errors
Dumping the errors
Creating An Adapter
AdapterMappings
Using The Adapter
Next Steps
3. ASPFormV1 API Information
Adapters
Clear
Clone
Copy
CreateAdapter
DumpConfig
DumpErrors
DumpState
getXML
IsDirty
IsValid
LoadFromRequest
LoadFromSession
LoadXML
StoreStateInSession
Validate
Version
4. Elements API Information
Count
getXML
Item
LoadXML
Remove
5. Element API Information
Error
getXML
IsDirty
IsRequired
IsValid
LastRulesetUsed
LoadXML
Name
sqlValue
Validate
Value
6. Rulesets API Information
Clear
Count
CreateRuleset
getXML
Item
LoadXML
Remove
7. Ruleset API Information
CreateRule
getXML
IsDefault
LoadXML
Name
Rules
SetAsDefault
Validate
8. Rules API Information
Clear
Count
CreateRule
getXML
Item
LoadXML
Remove
9. Rule API Information
appliesTo
ErrorDescription
getXML
LoadXML
Name
Param1
RuleType
10. Errors API Information
Clear
Count
getXML
Item
LoadXML
Remove
11. Error API Information
Description
Element
getXML
LoadXML
Rule
12. Adapters API Information
Clear
Count
CreateAdapter
getXML
Item
LoadXML
Remove
13. AdapterADO API Information
getInsertSQL
getUpdateSQL
CreateMapping
getXML
loadXML
Mappings
Name
TableName
14. ADOMappings API Information
Clear
Count
CreateMapping
getXML
Item
LoadXML
Remove
15. ADOMapping API Information
appliesTo
dataField
fieldType
getXML
LoadXML
Name
16. IAdapter API Information
Name

List of Examples

2.1. Creating an ASPForm Object
2.2. Adding Elements To An ASPForm Object
2.3. An ASP page with a basic HTML form
2.4. Retrieving Data From The Request Object
2.5. Dumping the configuration and current state
2.6. Configuring a validation ruleset
2.7. The CreateRule Method
2.8. Validating With An Entire Ruleset
2.9. Validating The Name Element
2.10. Iterating through the errors collection
2.11. DumpErrors method
2.12. Using CreateAdapter
2.13. Creating An AdapterMapping
2.14. The CreateMapping method
2.15. Using The ADO Adapter