Total Page Preview:   000000000349

What is session ?How any information will store and get in Asp.Net MVC?


Sessions are used to store user-specific data temporarily on the server side. This data can be accessed and modified throughout the user's interaction with the application.
In ASP.NET MVC, session data can be stored using the Session object, which is part of the HttpContext class. You can store any serializable object in the session.
Here's an example of how to store and retrieve data in a session in ASP.NET MVC:
In this example:
  • The SetSessionData action stores a username string and a UserDetails object in the session.
  • The GetSessionData action retrieves the stored data from the session.




Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn :





Facebook User: