Session

The basic behavior of web is stateless which means every request is identified as a new request. In ASP.NET every Web form that we create is a class and will be instantiated when user makes a request and also destroy, once the request is given to the client. This kind o behavior makes our controls and other values to be lost.
But with the concept of ASP.NET we can hold the values and provide stateful behavior to our page and also for application.
All the values created at different levels should be available to user as long as user is working. Even a web site with complete stateful activity is considered as very rich and functional web site.

ASP.NET session enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. As we said before web is stateless which means HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent or new request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session.

Leave a comment

Contact Us Now
close slider