0 votes
in C Sharp by

 What is TempData in MVC?

1 Answer

0 votes
by

TempData is a dictionary object to store data temporarily. It is a TempDataDictionary class type and instance property of the Controller base class. 
TempData can keep data for the duration of an HTTP request; in other words, it can keep live data between two consecutive HTTP requests. It will help us to pass the state between action methods. TempData only works with the current and subsequent request. TempData uses a session variable to store the data. TempData Requires type casting when used to retrieve data.

Related questions

0 votes
asked Mar 6, 2020 in C Sharp by Hodge
0 votes
asked Mar 6, 2020 in C Sharp by Hodge
0 votes
asked Mar 6, 2020 in C Sharp by Hodge
0 votes
asked Mar 6, 2020 in C Sharp by Hodge
0 votes
asked Jan 20, 2020 in C Sharp by AdilsonLima
...