Session is a property of Controller class. Its type is HttpSessionStateBase.
public HttpSessionStateBase Session { get; set; }
It is used to pass data within the application.It persists for its expiration time and is valid for all requests, not for a single redirect(unlike TempData)
Similar to TempData and viewData, it requires typecasting and null check to avoid error.
public HttpSessionStateBase Session { get; set; }
It is used to pass data within the application.It persists for its expiration time and is valid for all requests, not for a single redirect(unlike TempData)
Similar to TempData and viewData, it requires typecasting and null check to avoid error.
No comments:
Post a Comment