On May 2, 2:53 pm, "Robert Dufour" <bduf...@sgiims.comwrote:
In vb I can retrieve a session variable in a web site as follows.
Dim myvar as string
MyVar = Session.Item("VarName").ToString
But In C# there is no item property to use.
How do you retrieve the value of a session item in C#?
Thanks for any help
Bob
This is an Indexer which is handled by adding the Item property in VB,
these constructs are natively handled in C# and you can access your
session value as follows:
string myVar = Session["VarName"];
Hope this helps.