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...


What is the difference between viewdata and viewbag?



What is the difference between viewdata and viewbag?..

Answer / Suleman Ahmad Salmani

ViewData and ViewBag in MVC are used to pass data to the view from the controller. However, there is a subtle difference between them. ViewData is strongly typed (i.e., you have to specify the type of the data), while ViewBag is dynamically typed (i.e., you don't need to specify the type, and it automatically detects the data type based on the name).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MVC Model View Controller Interview Questions

What is razor in mvc?

1 Answers  


Why is mvc important?

1 Answers  


What are the steps for the execution of an mvc project?

1 Answers  


What is database first approach in mvc using entity framework?

1 Answers  


What are the exception filters in mvc?

1 Answers  


What are the filters in mvc?

1 Answers  


Does android use mvc?

1 Answers  


what are the benefits of area in mvc?

1 Answers  


What is MVC, MVP and MVVM pattern?

1 Answers   QuestPond,


What is mvc ioc?

1 Answers  


What is difference between razor and aspx in mvc?

1 Answers  


What is spring mvc model?

1 Answers  


Categories