We know Http is a stateless protocol and every request to the server is a fresh request. Once the request comes to the server ,after processing all the control's values and page information get destroyed from the server.
So, in order to persist data from one page to other page or across multiple request to the same page we need to do some additional work, called as state management.
In Asp.Net MVC we have Controller and View ,So we need to pass data either from Controller to View or View to Controller or sometimes from one Action to another. In any of the above situation we need to persist data that is the data we get in Controller's action is not directly accessible to view and will be null once processed, and needs to be persist.
Below are the different state management techniques used in Asp.Net MVC.
• TempData and
• Session variable
Read all the next sub articles one by one ,in order to grasp the concepts of above techniques.