ASP.NET MVC Interview questions


Total available count: 28
Subject - Microsoft Technologies
Subsubject - ASP.NET MVC

What is the difference between TempData.Keep() vs TempData.Peek()?

TempData.Keep() and TempData.Peek() are required to manage the TempData for subsequent requests.

TempData.Keep(): Keep maintains all the data and not to delete on the current request and It returns void. When a user wants to read on the data on current request and make it available to next request, Keep can be used.

TempData.Peek(): Peek maintains all the data with specific key and that key can be maintained in next request and it returns an object. When a user wants to read the using Peek that means the data will be available for next request also.




Next 5 interview question(s)

1
What is the use of TempData?
2
What is the difference between ViewData and ViewBag?
3
How to manage state management in MVC?
4
What is MVC design pattern?
5
What is Partial view?