Click to See Complete Forum and Search --> : ASP Help
98Bird
09-23-2003, 11:14 PM
Im doing a little something here and I have 2 asp pages where one posts to another. You enter some information and its supposed to post to the 2nd page but in an array. Does anyone know how to do that. Im semi familari with arrays but not sure how to pull the info from the 1st page into the 2nd with an array but I can do it with a response.write but i need to make it happen in an array.
Delphi00
09-23-2003, 11:22 PM
checked google?
I felt lucky so: http://www.bytesworth.com/learn/asp00006.asp
98Bird
09-24-2003, 01:14 AM
Already did a google search and I have seen that page. Doesnt help with posting from one asp page to another into an array.
bras0782
09-24-2003, 03:06 AM
Is it an array with many items?
I'd be tempted to run a loop to put each item into a hidden field or a cookie. then run a similar of page2 to retire. Not a great method, but ok if you have a small array.
I think a much better way to approach this is to look at how you got the array contents in the first place - meaning, where does the data come from? If you're picking up bits from different fields in page1 then why not pass on each field seperately and pick them up in page2. Does that make sense?
gameboy1234
09-25-2003, 04:22 AM
Maybe I'm wrong here but I thought there were two ways of passing data to an server side script.
One is GET, where the info is passed as part of the url. http://isp.net/yourpage.asp?a=1&b=2 where the a and b are the info being passed.
The seond is POST, where the information is passed as the result of a form input.
<form action="secondscript.asp" method=post>
<input type="text" name="a">
<input type="text" name="b">
<input type="submit">
</form>
You pick up these form values with the server side Request.Form("a") or "b" object.
And that's it. No arrays, just collections. If you want an array, you may have to load it into a form yourself, then pass it, then extract it from the form and put it back into an array.
What are you trying to do anyway?