Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set ASP arrays in VB script

Status
Not open for further replies.

YvonneTsang

Programmer
Sep 28, 2001
37
CA
Is there a way to set ASP arrays with a VBScript array and vice versa.

I tried to use arrayname = <%= ASParrray %> but that wasn't working. It seems to not understand the arrays. I was wondering if there is a simpler way then to grab each value individual which I have found to work. I am worried cause if my arrays get v. large It would be quite the performance hit. Someone please help me.
 
try to use like this
U have to generate an vbscript from your asp witc init the client side vbscript
<%
'asp code
%>
<script language=vbscript>
dim vbarray(<%=Ubound(aspArray)-Lbound(aspArray)%>)
<%
for i=lbound(aspArray) to Ubound(aspArray)
%>
vbarray(<%=i%>)=<%=aspArray(i)%>
<%
next
%>
</script>
<%
'aspcode
%>
________
George, M
 
How about the reverse way. Setting an ASP array with a VB script array in VB script.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top