473,799 Members | 2,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handling large form submissions

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("m yvar") 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
Jul 19 '05 #1
3 2151
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("m yvar")
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.
Jul 19 '05 #2
Make the names of your form fields significant. The method I use is as
follows:

fld t Firstname
fld t Lastname
fld n Age
fld d Birthdate

fld = this is a field I want to work with
t = text field
n = numeric field
d = date field

On form submit, it's a simple matter, then, to write a javascript loop that
looks for the "fld" and decides how to validate based on {t|n|d}. Error
messages are collected, concantenated together, then displayed at the end.
If there are no messages, the function returns true and the form submits.

This same method can be used server side to write insert and update sql
statements. Changes to forms require no rewrite of any of the processing
code as long as the new fields follow the convention.

- Wm
--
William Morris
Product Development, Seritas LLC

"Michael" <raterus@localh ost> wrote in message
news:eW******** ******@TK2MSFTN GP10.phx.gbl...
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("m yvar") 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

Jul 19 '05 #3
Michael, I like that idea. I've used the same idea for
forms where I have multiple checkboxs, etc. but never
thought about doing that for validation.

Thanks for the tip.
John
-----Original Message-----
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("m yvar") 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 tovalidate all 70, but there will probably be less impact on the user.Consider this: the user inputs data into 65 of the input fields andsomething happens before the form is submitted - the computer/browsercrashes, a power failure, etc. So now you have a frustrated user who has toenter 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 savedbefore 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 smalleramount of data.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my Fromheader is my spam trap, so I don't check it very often. You will get aquicker response by posting to the newsgroup.
.

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2283
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student - Dept.Informatics at Aristotle University of Thessaloniki URL-> http://agent.csd.auth.gr/~cmavrom -------------------------------------------------- -------------------------CLADE 2004--------------------------- Challenges of Large Applications in Distributed Environments June 7th, 2004, Honolulu,...
6
6399
by: nick4soup | last post by:
I have read the CGI FAQ 'How can I avoid users hitting "submit" twice' (on http://www.htmlhelp.org/faq/cgifaq.3.html#19 ) which essentially says you have to detect it at the server, using a hidden form field. That's fair enough. My server is therefore processing a response on the first request, so what kind of HTML response should I send out on the second, duplicate,
0
1520
by: Toby Inkster | last post by:
Like me, you are probably confronted with many requests for surveys, questionnaires, feedback forms, registration forms and so forth: forms where the processing requirements are very simple (store in a database or e-mail to a particular address). Despite the simple requirements, there is often quite a lot of work involved: crafting a database to store results, writing a function to store the data to the database, one to verify submitted...
4
2737
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a try/catch/finally wrapper of some sort to be sure the link is re-enabled in the face of an...
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9073
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.