Friday, June 15, 2018

How To Use TempData In ASP.NET

Tempdata is another beautiful feature in ASP.Net MVC. We use TempData just like we use ViewData. We’ve already discussed a lot about ViewBag and ViewData stuff. TempData is a container in which we maintain the state in consecutive request. TempData is used to store the temporary data. It is using session under the hood. But it is not exactly a session. It automatically clears in application but we need to explicitly clear our session variables. TempData is actually the TempDataDictionary type.

source https://www.c-sharpcorner.com/article/how-to-use-tempdata-in-asp-net/

No comments:

Post a Comment