Difference between a Session and an Application variable in ASP.Net

By [)ia6l0 iii

Although Application variable and a Session are server side state management techniques, they have some differences.

Application variables are the global variables of the ASP.Net application. It has the same lifetime as the application. Best example of an Application variable is Website Hit Counter.

Session variables are user specific, and last as long as the Session lasts. Example, the user's shopping cart.

Related FAQs

Have you been confused between Class and the CSSClass properties in ASP.Net?
The <%= expressions are evaluated during render, and the <%# expressions are evaluated during the DataBind
The primary differenct between ASP and ASP.NET is that the former is code that is interpreted by a Script Engine and the latter is a compiled code running on a web server.
Use this code snippet to find url's in a string.
Use the Override versions of the page methods instead of thedefault page methods. This would ensure that the .Net runtime does not have to invoke delegates.
You can check the contenttype of the request, and figure out if the request is an JSon request
Difference between a Session and an Application variable in ASP.Net  (1772 Views)