July 12, 2011

How to store and read value in Session state

Session["Blog"] = "Google Blogger";
Now we can read value from Session["Blog"] in whole application in current session.
It's life will be available for whole application in current seession.
It will be available after postback.

string blog = Session["Blog"].ToString();

No comments:

Post a Comment