Image may be NSFW.
Clik here to view.
Temp data: -Helps to maintain data when you move from one controller to other controller or from one action to other action. In other words when you redirect,“tempdata” helps to maintain data between those redirects. It internally uses session variables.
View data: - Helps to maintain data when you move from controller to view.
View Bag: - It’s a dynamic wrapper around view data. When you use “Viewbag” type casting is not required. It uses the dynamic keyword internally.
Image may be NSFW.
Clik here to view.
Session variables: – By using session variables we can maintain data from any entity to any entity.
Hidden fields and HTML controls: – Helps to maintain data from UI to controller only. So you can send data from HTML controls or hidden fields to the controller using POST or GET HTTP methods.
Below is a summary table which shows different mechanism of persistence.
Image may be NSFW.
Clik here to view.
MVC ASP.NET interview question References for further reading:-
• If you are new to MVC start MVC ( Model view controller) step by step from here.
• If you want to Learn MVC ( Model view controller) step by step start from here
• In case you want 500 videos on .NET interview question this is a nice site to look in to. http://www.questpond.com/
Image may be NSFW.
Clik here to view.

Clik here to view.
