softMind IT Tutorial: Maintaining Session in MVC
In ASP.net we used following state management tricks. Ofcourse not all but of the tricks we can still use in MVC build applications.
Client-Based State Management Options
- View State -- NOT IN MVC
- Control State -- NOT IN MVC
- Hidden Fields
- Cookies
- Query Strings
Server-Based State Management Options
- Application State
- Profile Properties
- Session State
Levels of state management :
- Single or multiple page level: State management at single as well as multiple page level i.e., managing state between page requests.
- User level: State should be preserved as long as a user is running the application.
- Application level: State available for complete application irrespective of the user, i.e., should be available to all users.
- Application to application level: State management between or among two or more applications
Session is maintained in MVC using :
- Tempdata
- viewdata
- viewbag
No comments:
Post a Comment