| |
|
What is a session in ASP.NET? Different ways to maintain session?
The most common used object, due to its usefulness is the Session object, and hence, it is a must-know
in any interview related to ASP NET or web based programming.
Session - The session object is used to store the data specific to a user for
the entire length of a user's visit to a website. Below is a code that shows usage of
the session object in ASP.NET ...
//InitialPage.aspx stores the user’s credentials in Session state
Session("UserName") = txtUserName.Text;
Server.Transfer("DestinationPage.aspx");
//DestinationPage.aspx gets the user’s name from Session state
String sString = Session("UserName").ToString();
For more details on session, Click Here.
Page Redirection
Values Between Pages
Worker Process
Page Life Cycle
Global Variables
Postback
Server Control
Viewstate
Send Email
Namespace
Localization
Event Handler
Validation
Global.asax
HttpHandler
Session
Cookie
EnableViewState
Smart Navigation
Web Farm
Dataset
Register
| |