Results 1 to 2 of 2

Thread: Arrays

  1. #1
    Join Date
    Dec 1969

    Default Arrays

    Is there a way to pass an array from page to page other than using Session or Application variables?

  2. #2
    Mr Swifty Guest

    Default RE: Arrays

    Use these, they&#039re great:<BR><BR>Call this on the sending page:<BR><BR>Function QueryString(arr(), strParamName)<BR>&#039---converts an array into querystring parameters; use it with the sub ArrFromQueryString<BR>&#039call it like so: &#060;A HREF=page.asp?&#060;%= QueryString(Array) %&#062;&OtherParam=.....etc.<BR>&#039returns something like: "strParamName=One&strParamName=Two&strParamName=Th ree"<BR>Dim i<BR> For i = LBound(arr) to UBound(arr)<BR> arr(i) = CStr(arr(i))<BR> If arr(i) &#060;&#062; "" Then<BR> QueryString = QueryString & strParamName & "=" & arr(i)<BR> QueryString = QueryString & "&"<BR> End If<BR> Next<BR> &#039cut off the last character<BR> QueryString = Left(QueryString, Len(QueryString) - 1)<BR>End Function<BR><BR>Call this on the receiving page:<BR><BR>Function ArrFromQueryString(strQueryString)<BR>&#039---returns an array made from a querystring<BR>&#039strQueryString, which will be eg Request("strParamName"), will be something like: "One,Two,Three"<BR> ArrFromQueryString = Split(strQueryString, ",")<BR>End Function<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts