|
-
May 3rd, 2000, 08:02 PM
#1
Thread Starter
Addicted Member
Hi,
i know how to put arrays into Session Object but how do ya assign a value from the array to any object on the page.
---- one page ----
Dim MyArray(20)
MyArray(0) = "a"
MyArray(1) = "b"
Session("TheArray") = MyArray
--- next page ----
Dim MyArray
'i got an error right here!
MyArray = Session("TheArray")
'and here
... name=FirstName value='<% =MyArray(0) %>' ....
--------------------------------
can you please help me, i just started ASP and some things are not just easy. Thx
-
May 4th, 2000, 11:25 AM
#2
Lively Member
This works...
<html>
<body>
<%
Dim MyArray(20)
MyArray(0) = "a"
MyArray(1) = "b"
Session("TheArray") = MyArray
%>
<BR><BR>--- next page ---- <BR><BR>
<%
ThisArray = Session("TheArray")
%>
<form>
<input type=text name=FirstName value="<%=ThisArray(0)%>">
</form>
</body>
</html>
type mismatch occur on the next page cause you declare the array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|