Chapter 2. ASPForms - A Sample Application

Table of Contents

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

Overview

We're going to take the ASPForms component and construct a sample application that should be able to get you through the basicsof using this component. Once we're done you will have a basic understanding of elements, rulesets, rules, errors, and adapters. We are not going to go through approaches for determining if you have a page post or how to structure your ASP sites/pages, it is assumed that you are familiar with the various strategies involved in asp development.