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 mvc dapper?

1 Answers  


Explain the concept of razor in asp.net mvc?

1 Answers  


What does mvc mean?

1 Answers  


What is the viewbag in mvc?

1 Answers  


How to share a view across multiple controllers in MVC?

1 Answers  


What does model-view-controller represent in an mvc application?

1 Answers  


What is bootstrap in mvc?

1 Answers  


What is mvc technology?

1 Answers  


How does mvc routing work?

1 Answers  


Explain what is mvc?

1 Answers  


Mention what "beforfilter()","beforerender" and "afterfilter" functions do in controller?

1 Answers  


Is angular 2 is mvc?

1 Answers  


Categories