Automating portions of your code can provide a huge time savings, but automated code is often highly resistant to accomodating simple, but exceptional, changes. What do you think of the techniques shown in this article? Can you think of other, simpler ways to accomplish the same results? Let us know in the web.asp discussion group.
If you've ever created data-driven forms, especially complex ones, you know how hard it is to make all the control names and database column names match up correctlyand you'll immediately appreciate how the techniques shown in this article can simplify development, reduce errors, and minimize maintenance.
by Steve Skelton
November 14, 2003
TML form handling consists of a set of named form controls on an HTML page and a Submit button for sending the information contained by the controls to a server, which presents a confirmation/summary page to the user, validates the information and then updates a database. Most important forms insert one more stepdisplaying the entered data in a preview page so that users can examine the information and correct any errors or incomplete data. When the user approves the information, the preview page's Submit button sends the data to the server, where server-side code writes the information to a database.
If you've developed data-driven Web applications, this scenario should be very familiar. Unfortunately, as forms become more complex, all this passing data back and forth makes developing such pages labor-intensive. It becomes increasingly difficult to ensure that developers perform the data-passing operations correctly, matching the form field control names to the label names for the data on the preview page, and eventually, to the correct columns in the database.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!