Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > submitting more than one form

Reply
Thread Tools

submitting more than one form

 
 
Sara
Guest
Posts: n/a
 
      03-10-2005
Hi all,
I don't know if this is possible or if it even makes sense, but this is what
I want to do. I have a page with a form to fill in a timesheet for a user.
Depending on how many users did a "job", a form will appear on the page for
each user. So basically, you could have 3 forms, all with the same names etc.
and the only thing distinguishing them is a hidden input with userID and
different data for each user. Now what I want the person to be able to do is
fill out all the forms on the page and submit them at one time, rather than
one at a time. Then in the asp, I'd like to iterate through each form that
was submitted (obv I don't know how many were so I assume I'd go through a
collection if one exists) and process them one after the next.
Is this possible and if so, how do I submit them all together and how do I
then go through them on the asp side.

Thanks in advance for any help or for a better approach to this prob.

--
Sara
 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      03-10-2005
"Sara" wrote in message
news:BF6EF5AD-EAC4-4227-873B-...
: I don't know if this is possible or if it even makes sense, but this is
what
: I want to do. I have a page with a form to fill in a timesheet for a user.
: Depending on how many users did a "job", a form will appear on the page
for
: each user. So basically, you could have 3 forms, all with the same names
etc.
: and the only thing distinguishing them is a hidden input with userID and
: different data for each user. Now what I want the person to be able to do
is
: fill out all the forms on the page and submit them at one time, rather
than
: one at a time. Then in the asp, I'd like to iterate through each form that
: was submitted (obv I don't know how many were so I assume I'd go through a
: collection if one exists) and process them one after the next.
: Is this possible and if so, how do I submit them all together and how do I
: then go through them on the asp side.
:
: Thanks in advance for any help or for a better approach to this prob.

I don't know if what you're asking is possible. I have written an example
to show you how to build a form with a dynamic number of elements. You
would be passing the number of elements somehow to this page, either posting
from another form or on the URL as a querystring element. I have you select
the number of users from a range of 1 to 5.

When you post, it will create the form for user input. You can pass the
user IDs but here I'm having you enter them, along with a name and an age,
as an example.

When you post again, I will display the results. You could use this area to
also submit to a database.

This is all done on one page and although a simple example, it can really be
any size simply by adding more input fields. You could really be creative
and make the fields dynamic as well.

http://kiddanger.com/lab/formsarray.asp

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
 
Sara
Guest
Posts: n/a
 
      03-11-2005
Thanks Roland.
I'm aware that I can do it your way, I was just hoping I could do it the way
I suggested cause it's simpler!
But I think I'll take your suggestion because my way doesn't seem possible.

Sara

"Roland Hall" wrote:

> "Sara" wrote in message
> news:BF6EF5AD-EAC4-4227-873B-...
> : I don't know if this is possible or if it even makes sense, but this is
> what
> : I want to do. I have a page with a form to fill in a timesheet for a user.
> : Depending on how many users did a "job", a form will appear on the page
> for
> : each user. So basically, you could have 3 forms, all with the same names
> etc.
> : and the only thing distinguishing them is a hidden input with userID and
> : different data for each user. Now what I want the person to be able to do
> is
> : fill out all the forms on the page and submit them at one time, rather
> than
> : one at a time. Then in the asp, I'd like to iterate through each form that
> : was submitted (obv I don't know how many were so I assume I'd go through a
> : collection if one exists) and process them one after the next.
> : Is this possible and if so, how do I submit them all together and how do I
> : then go through them on the asp side.
> :
> : Thanks in advance for any help or for a better approach to this prob.
>
> I don't know if what you're asking is possible. I have written an example
> to show you how to build a form with a dynamic number of elements. You
> would be passing the number of elements somehow to this page, either posting
> from another form or on the URL as a querystring element. I have you select
> the number of users from a range of 1 to 5.
>
> When you post, it will create the form for user input. You can pass the
> user IDs but here I'm having you enter them, along with a name and an age,
> as an example.
>
> When you post again, I will display the results. You could use this area to
> also submit to a database.
>
> This is all done on one page and although a simple example, it can really be
> any size simply by adding more input fields. You could really be creative
> and make the fields dynamic as well.
>
> http://kiddanger.com/lab/formsarray.asp
>
> HTH...
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>
>

 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      03-11-2005
"Sara" wrote in message
newsC620995-B8D2-458B-AC61-...
: Thanks Roland.

You're welcome.

: I'm aware that I can do it your way, I was just hoping I could do it the
way
: I suggested cause it's simpler!
: But I think I'll take your suggestion because my way doesn't seem
possible.

If it is possible, I'm not aware of it.
Good luck.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can one declare more than one signal on one line? Merciadri Luca VHDL 4 11-01-2010 02:00 PM
Form within a Form - will it cause problems when submitting? Dave Smithz HTML 3 10-30-2009 07:24 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com Java 0 03-06-2008 08:11 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C++ 0 03-05-2008 08:41 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C Programming 0 03-05-2008 03:26 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57