Thank you.It's really very easy. In fact the Session object is just a collection that is unique on a per-user basis (so each user has his own session and thus his own session object). To store something in the Session-collection use this syntax:
VB
Session("nameofthevalue") = someobjectC#
Session["nameofthevalue"] = someobject;
To retrieve a value from the Session collection, use the inverted syntax (e.g. with a String object):
VB
myString = CType(Session("nameofthevalue"),String)C#
myString = (string) Session["nameofthevalue"];
Hope this helps?
Maybe you can explain in brief what you want to achieve. This would allow us to give a practical example...
Try this site:
http://samples.gotdotnet.com/quickstart/aspplus/
And select "Managing Application State" from the Table of Content on the Left Frame.
It is an ASP.NET QuickStart Tutorial with code samples in both VB.NET and C#.NET.
Hope this helps..
0 comments:
Post a Comment