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 |
What is mvc dapper?
Explain the concept of razor in asp.net mvc?
What does mvc mean?
What is the viewbag in mvc?
How to share a view across multiple controllers in MVC?
What does model-view-controller represent in an mvc application?
What is bootstrap in mvc?
What is mvc technology?
How does mvc routing work?
Explain what is mvc?
Mention what "beforfilter()","beforerender" and "afterfilter" functions do in controller?
Is angular 2 is mvc?