For Programmers: Free Programming Magazines  


Home > Archive > ASP > December 2006 > Re: is there a way to capture all form fields using loops?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: is there a way to capture all form fields using loops?
Mike Brind

2006-12-11, 6:57 pm


"User" <user@email> wrote in message
news:1165507579_7059@sp6iad.superfeed.net...
> Hi,
>
> I have a massive webform...
>
> is there a way to use a loop to get all the field names of the form?
>
> eg: in php, u can do a
> foreach($_POST as $key=>$value)
> {
> blah blah....
> }
>
> how do u emulate that in classic asp 3.0?
>


For Each x in Request.Form
blah blah
Next

If you want to write it to the browser, change blah blah to

Response.Write x & ": " & Request.Form(x) & "<br>"

--
Mike Brind


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com