What is the use of keep and peek in “tempdata”?
Answer / Gyanendra Kumar
In ASP.NET MVC, TempData maintains data for a single request and response cycle by default. However, there are two special methods available: Keep and Peek. Keep adds the data to TempData with a duration of one additional request, ensuring that it survives the immediate response and remains accessible in the next controller action. On the other hand, Peek retrieves data from TempData without removing it, allowing you to check its value before adding or replacing anything.
| Is This Answer Correct ? | 0 Yes | 0 No |
Mention what are the file extensions for razor views?
What is a mvc in medical terms?
What is mvc technology?
What is mvc (model view controller)?
What are main benefits of using mvc?
How you can manage code security in mvc?
What is meaning of View in MVC?
which filters are executed in the end?
List out the types of result in mvc?
What is mvc and its advantages?
What is mvc httppost?
Who invented mvc?