I have a VB .NET web application.
I have a structure of data I want to keep throughout the whole
session. Now I do it like below.
Structure SMyStruct
Dim number as Integer
......
End Structure
Private Sub Button_Go_Click(....) ....
Dim S As SMyStruct = Session("MyStruct")
S.number = 7
Session("MyStruct") = S
End Sub
This works, but not very efficient when the structure is big. The data
first gets copied from the Session then modified and then stored back
to the Session.
And I do NOT want to use the syntax
Session("MySessionObj").number = 7
for obvious reasons.
So is there any trick around that lets me get a reference to a session
variable so I can modify my structure members directly.