You see the code below, how I did use the session variable;
So the three questions are:
- Where are they stored? (Server or Client side)
- Are they unique for each web page visitor?
- Can I remove it using ajax or simple js code when my job is done with it? or it will be removed automatically..?
.
sbyte[][] arrImages = svc.getImagesForFields(new String[] { "CustomerName", "CustomerSurName" });
Dictionary<string, byte[]> smartImageData = new Dictionary<string, byte[]>();
int i = 0;
foreach (sbyte[] bytes in arrImages)
{
smartImageData.Add(fieldNames[i], ConvertToByte(bytes));
i++;
}
Session.Add("SmartImageData", smartImageData);
Read more about sessions here. To answer your questions:
ASP.NET_SessionId), or server-side by callingSession.Abandon(). Also, a session times out after a certain (configurable) period of inactivity.