Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Mention what is the difference between temp data, view, and view bag?



Mention what is the difference between temp data, view, and view bag?..

Answer / Satish Chandra

In MVC Model View Controller, TempData is a helper class that allows you to store values that need to be displayed or passed from one action method to another during a single request. It's used for temporary storage of information between calls to different controller actions within the same request. ViewData and ViewBag are ways to pass data from the controller to the view in ASP.NET MVC applications. They allow you to populate data into strongly-typed views or Razor views. The main difference lies in their usage: ViewData is a dictionary object that uses string keys, while ViewBag dynamically creates an anonymous type with property names matching the C# identifier case of the property name set on it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MVC Model View Controller Interview Questions

What is dao in mvc?

1 Answers  


How do the mvp, mvc, and mvvm patterns relate? When are they appropriate?

1 Answers  


Mention what are the file extensions for razor views?

1 Answers  


What is known as mvc?

1 Answers  


Mention what is the importance of nonactionattribute?

1 Answers  


What does mvc mean?

1 Answers  


What is viewbag mvc?

1 Answers  


Mention what is the difference between viewdata and viewbag?

1 Answers  


What is crud mvc?

1 Answers  


What is mvc handler?

1 Answers  


What is the difference between asynchronous and synchronous actions? When would you use asynchronous actions?

1 Answers  


Does mvc have viewstate?

1 Answers  


Categories