How does view data differ from view bag in mvc?
Answer / Ashwani Kumar Joshi
ViewData is a dictionary object that can be used to pass data from the controller to the view. It has a stronger typing and a key-value pair structure. ViewBag, on the other hand, is a dynamic object that allows for easier data binding but with weak typing.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain the need of display mode in mvc?
What is meant by mvc?
What are action verbs mvc?
What is data annotation in mvc?
What is get and post actions types?
What is partial view in mvc?
What are the main razor syntax rules?
Mention what are main benefits of using mvc?
What is razor view engine in mvc?
Explain user authentication and authorizeattribute in mvc?
Which is better mvvm or mvc?
What is routing in mvc interview questions?