|
 |
asp_databases thread: Re: passing an array
Message #1 by jiwilliams@c... on Thu, 16 May 2002 18:49:20
|
|
Thank you all. Since I'm not using a form, I'm going to try the session
variable solution. Thanks alot.
Jimmy
> You could use a loop to create hidden fields in your form and pass the
information in the array.
You could store the array in a session variable and remove it once your
done
with it.
I'm sure there are other ways to skin this cat as well....
Cheers,
Clint
::Does anyone know if an array can be passed
::through "Request.QueryString"? If not, how can one be passed from one
::asp page to another?
::Jimmy
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #2 by imran.saleem@b... on Thu, 16 May 2002 17:48:39 +0100
|
|
<FORM ACTION=formres.asp METHOD=post >
Dim xTestArray(3) ' declare and
populate the array
xTestArray(0) = "a"
xTestArray(1) = "b"
xTestArray(2) = "c"
xTestArray(3) = "d"
FOR i=0 to UBOUND(xTestArray) ' write out hidden fields in
your form with the values of the array above
Response.write "<INPUT TYPE=hidden NAME=array" & i & " VALUE=" &
xTestArray(i) & ">"
NEXT
<input type =submit value=send><BR><BR>
</FORM>
in formres.asp do a response.write to display the array.
FOR EACH obj IN request.form
Response.write obj & " : " & request.form(obj) & "<BR>"
NEXT
If you need the values of the hidden fields to be in an array just create
another array and populate it with the hidden values
eg.
Dim newarray()
xno = request.form.count -1
ReDim newarray(xno)
i=0
FOR EACH obj IN request.form
newarray(i) = request.form(obj)
i = i +1
NEXT
Message #3 by "CLINTON PARSLEY" <cparsley@m...> on Thu, 16 May 2002 09:25:34 -0700
|
|
You could use a loop to create hidden fields in your form and pass the
information in the array.
You could store the array in a session variable and remove it once your done
with it.
I'm sure there are other ways to skin this cat as well....
Cheers,
Clint
::Does anyone know if an array can be passed
::through "Request.QueryString"? If not, how can one be passed from one
::asp page to another?
::Jimmy
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #4 by Colin.Montgomery@C... on Thu, 16 May 2002 16:57:01 +0100
|
|
you could always generate some XML using JavaScript and POST this from a
form.
Then use Request.Form in your ASP to get it into a variable. Next load it
into a DOM object and parse it using XSLT or, if like me you don't know any
XSLT yet, you can use the DOM and XPath queries to walk through the nodes of
the XML document.
If you don't know any XML, take some confidence in the fact that neither did
I until 2 weeks ago. There are numerous XML sites and P2P's 'XML_ASP' list
can be very helpful.
HTH,
Col
-----Original Message-----
From: jiwilliams@c... [mailto:jiwilliams@c...]
Sent: 16 May 2002 17:44
To: ASP Databases
Subject: [asp_databases] passing an array
Hi all,
Does anyone know if an array can be passed
through "Request.QueryString"? If not, how can one be passed from one asp
page to another?
Jimmy
*******
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the
intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are
not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
For further information about Clifford Chance please see our website at http://www.cliffordchance.com or refer to any Clifford
Chance office.
Message #5 by jiwilliams@c... on Thu, 16 May 2002 16:44:04
|
|
Hi all,
Does anyone know if an array can be passed
through "Request.QueryString"? If not, how can one be passed from one asp
page to another?
Jimmy
|
|
 |