I want to save some strings in a Session("myKey") as an ArrayList in my asp.net application.
So I have somthing like that:
Dim s As String = "String1"
If I use
Session("myKey") = s
it is working for the moment.
After PostBack I want to add another string to the session.
If do the same thing again, then i will overwrite my Sessiondata.
So I’m searching for something like this:
Dim s As String = "String1"
TryCast(Session("myKey"), ArrayList).Add(s)
In this case the Sessiondata would be stored correctly, but my code is not correct.
I’ve tried and found a solution by myself;
Don’t know if it is the usual way, but it is working.