How to use session in mvc

How to Make Seesion Value From User Table How to Use session IN Layout Page For User Role Task

By  Junaid A    15-Sep-2023    2


Junaid A

- Session in .net saves data similar to a Dictionary object i.e. Keys and Values where Keys are String while Values will be objects. e.g string, number, object (single object, list, array) - While retrieving, the data it needs to be converted to its original data type as the data is stored as objects and it also requires NULL checks while retrieving. - Session is used for passing value from Controller to View and also from one Controller to another. - Session is available across multiple requests. It is not destroyed on redirection. - Session time out default value 30 mints

Your Answer