Michael wrote:
Does anyone have any ideas about how I can go about this faster.
I have a large form that is being submitted, and from that a new row
in a database will be created. I'm working on the page that will
error check whatever they send before it gets put in the database. I
just want to do pretty basic things, make sure numbers are really
numbers, text length doesn't go past the length specified in the
database, etc.
My problem is, I'm stuck going through about 70 Request.Form("myvar")
and applying the checks. Makes for lots of coding i'd rather not
waste my time on.
Does anyone have any ideas for making this process faster?
Thanks
--Michael
Break the form up into smaller bits? You'll still need to write the code to
validate all 70, but there will probably be less impact on the user.
Consider this: the user inputs data into 65 of the input fields and
something happens before the form is submitted - the computer/browser
crashes, a power failure, etc. So now you have a frustrated user who has to
enter all 65 pieces of data again! Not cool.
Better would be to put related sections of the data into their own forms.
When the user hits continue,. the data from the smaller form gets saved
before going on to the next form. That way, if the process gets interrupted,
the user can start off where he left off, only having to re-enter a smaller
amount of data.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.