473,791 Members | 3,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to collect uncertain number of people information in a form

Hi everyone,

I need to write a insruance program which needs to collect multiple people
information,
The information for each person includes name, email, address, phone, dob etc.
The DOB data will be used for calculate premium for each person. and then
display total premium quote to the user
I had never done that before and not sure, in asp technology what is the
easiest way to do.
Let's say the user want to enroll 30 people but I cannot display 30 grid on
one asp page, and have to display 15 grid on the first page and then next 15
on the next page. What I should do in order to store all the information
about the 30 people in the memory and insert into database at a once.
Thank you
--
Betty
Oct 4 '06 #1
4 1762
"c676228" <be****@communi ty.nospamwrote in message
news:A5******** *************** ***********@mic rosoft.com...
Hi everyone,

I need to write a insruance program which needs to collect multiple people
information,
The information for each person includes name, email, address, phone, dob
etc.
The DOB data will be used for calculate premium for each person. and then
display total premium quote to the user
I had never done that before and not sure, in asp technology what is the
easiest way to do.
Let's say the user want to enroll 30 people but I cannot display 30 grid
on
one asp page, and have to display 15 grid on the first page and then next
15
on the next page. What I should do in order to store all the information
about the 30 people in the memory and insert into database at a once.
Thank you
Why not show a grid for as many people as needed?

Will this get you started? Watch for word-wrap.

It's 3 pages in one: first it asks how many rows you want;
then it allows entry or that number of rows; then it displays
what was entered in those rows.

Just add field validation, database access, and a better UI.
<%@ Language="VBScr ipt" %>
<% Option Explicit
'*
Const cASP = "census.asp "
'*
Dim intROW
Dim strROW
strROW = Request.Form("r ows")
Dim booTBL
booTBL = True
Dim strTBL
strTBL = ""
'*
If Request.Form("s how") = "True" Then
Call Show()
ElseIf IsNumeric(strRO W) Then
Call Rows()
End If

Sub Rows()
For intROW = 1 To Cint(strROW)
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td><input type='text' name='nam" & intROW & "' size='20'
maxlength='30' class='text'></td>" & _
" <td><input type='text' name='ema" & intROW & "' size='20'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='add" & intROW & "' size='30'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='tel" & intROW & "' size='15'
maxlength='20' class='text'></td>" & _
" <td><input type='text' name='dob" & intROW & "' size='10'
maxlength='10' class='text'></td>" & _
"</tr>"
Next
End Sub

Sub Show()
For intROW = 1 To Cint(strROW)
Request.Form("" )
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td>" & Request.Form("n am" & intROW) & "</td>" & _
" <td>" & Request.Form("e ma" & intROW) & "</td>" & _
" <td>" & Request.Form("a dd" & intROW) & "</td>" & _
" <td>" & Request.Form("t el" & intROW) & "</td>" & _
" <td>" & Request.Form("d ob" & intROW) & "</td>" & _
"</tr>"
Next
booTBL = False
End Sub
%>
<html>
<head>
<title>census.h tm</title>
<style type="text/css">
body { font-family:Arial; font-size:9pt }
td { font-family:Arial; font-size:8pt }
th { font-family:Arial; font-size:8pt; font-weight:bold }
..text { font-family:Arial; font-size:8pt }
</style>
</head>
<body>
<center>
<form action="<%=cASP %>" method="post">
<% If strTBL <"" Then %>
<h4>Enter Census Data</h4>
<table border="0" cellpadding="0" cellspacing="2" width="700">
<tr>
<th align="left">No .<hr></th>
<th align="left">Na me<hr></th>
<th align="left">Am ail<hr></th>
<th align="left">Ad dress<hr></th>
<th align="left">Ph one<hr></th>
<th align="left">Bi rthdate<hr></th>
</tr>
<%=strTBL%>
</table>
<% If booTBL Then %>
<input type="hidden" name="rows" value="<%=strRO W%>">
<input type="hidden" name="show" value="True">
<input type="submit" value="Submit">
<% End If %>
<% Else %>
<input type="hidden" name="show" value="False">
<input type="text" name="rows" size="2" maxlength="2" value="1">
<input type="submit" value="Submit">
<% End If %>
</form>
</center>
</body>
</html>
Oct 4 '06 #2
Mckirahan,
That's the perfect start for me to think about it. Thank you so much.
Allow me to ask you one more question, what does Request.Form("" ) serve for?
Sincerely
--
Betty
"McKirahan" wrote:
"c676228" <be****@communi ty.nospamwrote in message
news:A5******** *************** ***********@mic rosoft.com...
Hi everyone,

I need to write a insruance program which needs to collect multiple people
information,
The information for each person includes name, email, address, phone, dob
etc.
The DOB data will be used for calculate premium for each person. and then
display total premium quote to the user
I had never done that before and not sure, in asp technology what is the
easiest way to do.
Let's say the user want to enroll 30 people but I cannot display 30 grid
on
one asp page, and have to display 15 grid on the first page and then next
15
on the next page. What I should do in order to store all the information
about the 30 people in the memory and insert into database at a once.
Thank you

Why not show a grid for as many people as needed?

Will this get you started? Watch for word-wrap.

It's 3 pages in one: first it asks how many rows you want;
then it allows entry or that number of rows; then it displays
what was entered in those rows.

Just add field validation, database access, and a better UI.
<%@ Language="VBScr ipt" %>
<% Option Explicit
'*
Const cASP = "census.asp "
'*
Dim intROW
Dim strROW
strROW = Request.Form("r ows")
Dim booTBL
booTBL = True
Dim strTBL
strTBL = ""
'*
If Request.Form("s how") = "True" Then
Call Show()
ElseIf IsNumeric(strRO W) Then
Call Rows()
End If

Sub Rows()
For intROW = 1 To Cint(strROW)
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td><input type='text' name='nam" & intROW & "' size='20'
maxlength='30' class='text'></td>" & _
" <td><input type='text' name='ema" & intROW & "' size='20'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='add" & intROW & "' size='30'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='tel" & intROW & "' size='15'
maxlength='20' class='text'></td>" & _
" <td><input type='text' name='dob" & intROW & "' size='10'
maxlength='10' class='text'></td>" & _
"</tr>"
Next
End Sub

Sub Show()
For intROW = 1 To Cint(strROW)
Request.Form("" )
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td>" & Request.Form("n am" & intROW) & "</td>" & _
" <td>" & Request.Form("e ma" & intROW) & "</td>" & _
" <td>" & Request.Form("a dd" & intROW) & "</td>" & _
" <td>" & Request.Form("t el" & intROW) & "</td>" & _
" <td>" & Request.Form("d ob" & intROW) & "</td>" & _
"</tr>"
Next
booTBL = False
End Sub
%>
<html>
<head>
<title>census.h tm</title>
<style type="text/css">
body { font-family:Arial; font-size:9pt }
td { font-family:Arial; font-size:8pt }
th { font-family:Arial; font-size:8pt; font-weight:bold }
..text { font-family:Arial; font-size:8pt }
</style>
</head>
<body>
<center>
<form action="<%=cASP %>" method="post">
<% If strTBL <"" Then %>
<h4>Enter Census Data</h4>
<table border="0" cellpadding="0" cellspacing="2" width="700">
<tr>
<th align="left">No .<hr></th>
<th align="left">Na me<hr></th>
<th align="left">Am ail<hr></th>
<th align="left">Ad dress<hr></th>
<th align="left">Ph one<hr></th>
<th align="left">Bi rthdate<hr></th>
</tr>
<%=strTBL%>
</table>
<% If booTBL Then %>
<input type="hidden" name="rows" value="<%=strRO W%>">
<input type="hidden" name="show" value="True">
<input type="submit" value="Submit">
<% End If %>
<% Else %>
<input type="hidden" name="show" value="False">
<input type="text" name="rows" size="2" maxlength="2" value="1">
<input type="submit" value="Submit">
<% End If %>
</form>
</center>
</body>
</html>
Oct 4 '06 #3
"c676228" <be****@communi ty.nospamwrote in message
news:3B******** *************** ***********@mic rosoft.com...
Mckirahan,
That's the perfect start for me to think about it. Thank you so much.
Allow me to ask you one more question,
what does Request.Form("" ) serve for?
Request.Form("" ) returns the contents of the form field named
within the parentheses when the form is posted.

Thus, Request.Form("t est_field") returns the contents of
<input type="text" name="test_fiel d" ...>

The form field could be a text or password item, select option(s),
checkbox, radiobutton, or textarea.

For more information, visit these links:

ASP Tutorial
http://www.w3schools.com/asp/

ASP Request Object
http://www.w3schools.com/asp/asp_ref_request.asp
Oct 4 '06 #4
I will suggest you bind your datasource to a GridView Control.
This way, u can view any page by clicking on the page number, by the bottom
of the gridview control. any updates made to the datasource is made once.
If your data is comming from a middle Tier(a user defined class), you may
choose ObjectDataSourc e as the datasource and bind it to the gridview.
--
Okoronkwo Chinedu
MCAD
"c676228" wrote:
Mckirahan,
That's the perfect start for me to think about it. Thank you so much.
Allow me to ask you one more question, what does Request.Form("" ) serve for?
Sincerely
--
Betty
"McKirahan" wrote:
"c676228" <be****@communi ty.nospamwrote in message
news:A5******** *************** ***********@mic rosoft.com...
Hi everyone,
>
I need to write a insruance program which needs to collect multiple people
information,
The information for each person includes name, email, address, phone, dob
etc.
The DOB data will be used for calculate premium for each person. and then
display total premium quote to the user
I had never done that before and not sure, in asp technology what is the
easiest way to do.
Let's say the user want to enroll 30 people but I cannot display 30 grid
on
one asp page, and have to display 15 grid on the first page and then next
15
on the next page. What I should do in order to store all the information
about the 30 people in the memory and insert into database at a once.
Thank you
Why not show a grid for as many people as needed?

Will this get you started? Watch for word-wrap.

It's 3 pages in one: first it asks how many rows you want;
then it allows entry or that number of rows; then it displays
what was entered in those rows.

Just add field validation, database access, and a better UI.
<%@ Language="VBScr ipt" %>
<% Option Explicit
'*
Const cASP = "census.asp "
'*
Dim intROW
Dim strROW
strROW = Request.Form("r ows")
Dim booTBL
booTBL = True
Dim strTBL
strTBL = ""
'*
If Request.Form("s how") = "True" Then
Call Show()
ElseIf IsNumeric(strRO W) Then
Call Rows()
End If

Sub Rows()
For intROW = 1 To Cint(strROW)
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td><input type='text' name='nam" & intROW & "' size='20'
maxlength='30' class='text'></td>" & _
" <td><input type='text' name='ema" & intROW & "' size='20'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='add" & intROW & "' size='30'
maxlength='50' class='text'></td>" & _
" <td><input type='text' name='tel" & intROW & "' size='15'
maxlength='20' class='text'></td>" & _
" <td><input type='text' name='dob" & intROW & "' size='10'
maxlength='10' class='text'></td>" & _
"</tr>"
Next
End Sub

Sub Show()
For intROW = 1 To Cint(strROW)
Request.Form("" )
strTBL = strTBL & _
"<tr>" & _
" <td>" & intROW & ".</td>" & _
" <td>" & Request.Form("n am" & intROW) & "</td>" & _
" <td>" & Request.Form("e ma" & intROW) & "</td>" & _
" <td>" & Request.Form("a dd" & intROW) & "</td>" & _
" <td>" & Request.Form("t el" & intROW) & "</td>" & _
" <td>" & Request.Form("d ob" & intROW) & "</td>" & _
"</tr>"
Next
booTBL = False
End Sub
%>
<html>
<head>
<title>census.h tm</title>
<style type="text/css">
body { font-family:Arial; font-size:9pt }
td { font-family:Arial; font-size:8pt }
th { font-family:Arial; font-size:8pt; font-weight:bold }
..text { font-family:Arial; font-size:8pt }
</style>
</head>
<body>
<center>
<form action="<%=cASP %>" method="post">
<% If strTBL <"" Then %>
<h4>Enter Census Data</h4>
<table border="0" cellpadding="0" cellspacing="2" width="700">
<tr>
<th align="left">No .<hr></th>
<th align="left">Na me<hr></th>
<th align="left">Am ail<hr></th>
<th align="left">Ad dress<hr></th>
<th align="left">Ph one<hr></th>
<th align="left">Bi rthdate<hr></th>
</tr>
<%=strTBL%>
</table>
<% If booTBL Then %>
<input type="hidden" name="rows" value="<%=strRO W%>">
<input type="hidden" name="show" value="True">
<input type="submit" value="Submit">
<% End If %>
<% Else %>
<input type="hidden" name="show" value="False">
<input type="text" name="rows" size="2" maxlength="2" value="1">
<input type="submit" value="Submit">
<% End If %>
</form>
</center>
</body>
</html>

Oct 7 '06 #5

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

Similar topics

4
2250
by: William Morris | last post by:
Our application tracks contact information. One of our clients, a car dealership, has asked about being able to enter a lastname and phone number and getting as much of the main form filled out as possible, "Hi, thanks for stopping by Demaux Motors. Before we get started, can I get your phone number, please? Oh, HI Joe, you still live on Gingerbread lane..?" etc etc etc. Filling out the form is easy - sql query, javascript, blah blah...
0
1507
by: nick_faye | last post by:
Hi, I hope somebody can help me. I am collecting data from different external ms access database on my VB programming. I am using the SQL command as shown below: While strPaths(iCtr) <> "" And iCtr <= MAX_ALLOW_DBASE dbase.Execute "INSERT INTO DailySalesReport " & _ "SELECT table1.storeqs, table1.styleqs, table1.dateqs, table1.idnumberqs, table1.cashqs, table1.salesclerkqs, table1.qs,
9
8567
by: Frank Rizzo | last post by:
I understand the basic premise: when the object is out of scope or has been set to null (given that there are no funky finalizers), executing GC.Collect will clean up your resources. So I have a basic test. I read a bunch of data into a dataset by using a command and a data adapter object, .Dispose(ing) as I go. The moment the data is in the Dataset, the Mem Usage column in the Task Manager goes up by 50 MB (which is about right). I...
7
4142
by: Novice Computer User | last post by:
Hi. I want people to enter specific information on my website - most likely in a form. (i.e. their name, address, etc). I then want that information to be emailed to me. Is there a way to do this using just html code? I generally use Frontpage to create web pages. But here is what the help said, "Microsoft FrontPage Server Extensions must be installed on the server on which your web site is located." Unforutnately, I don't have...
3
2569
by: liberatingathena | last post by:
I'm writing you from Alajuela, Costa Rica. It's 4:30 in the morning here and I'm reaching a point of pure desperation as I've been searching the internet all night for a solution. I am not an access wizard. I just started looking at it actually because I'm trying to learn about asp pages and storing form information. I'm trying desperately to find a solution to displaying ONLY the record number of the last entry into the form. I'm...
3
3306
by: brad.goldberg | last post by:
Hey All, I know this has been addressed in a few different conversations but none are exactly what I am trying to do, bear with me I am an access Newbie. Basically I have a form that assigns Run Numbers to each record (EMS agency, each record is a Run Number, versus like a PO number or Work Order..).
8
4015
by: King | last post by:
Hi I have following MS Acess query Here is the query ID Name Prgm ID Client ID Date Start Time End Time Minutes C4 Trisha TIP DEK0703 7 /7 /2006 10:00:00 AM 12:00:00 PM 120
4
3409
by: shelley_2000 | last post by:
What is the best approach to collect and load Employee Resume Data from External Employees who may not have Microsoft access? If is likely they will have Microsoft Word, but not Microsoft Access. Is there any type of form/template that I could send to employees to fill out and send back for me to import into the Access Database? Or should I consider a Word Forms with some type of data extractor for loading into Access database? and if...
2
4450
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for statistical purposes. I've been using Here's the situation: I have two main tables:
0
9517
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
10207
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
10156
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
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
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...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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
5435
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...
3
2916
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.