I know it's possible to put an array in a session variable, but is it possible to place a structured array in a session variable then be able to retrieve specific members from the structured array and display them on another web page.
Here is my structure
Structure Questionset
Dim question As String
Dim choiceA As String Dim choiceB As String Dim choiceC As String Dim answer As String End StructureHere is the code I used to assign the members:
For i=1 to 5
question =
CType(dgi.Cells(2).Text, String)choiceA =
CType(dgi.Cells(3).Text, String)choiceB =
CType(dgi.Cells(4).Text, String)choiceC =
CType(dgi.Cells(5).Text, String)answer =
CType(dgi.Cells(6).Text, String)questions(i).question = question
questions(i).choiceA = choiceA
questions(i).choiceB = choiceB
questions(i).choiceC = choiceC
questions(i).answer = answer
NextI need to place all of the values in a session array so that when I go to another page, I can retrieve the value of question(1).question, question(2).question, question(3).question, etc...
Is this possible? Can someone provide the sample code to do this? Or provide any other suggestions.
Please help with vb.net code since that is the only language I know.
Replies
Know the answer? Post it — somebody with the same question will find it here.