What is difference between Viewbag and Viewdata in ASP.NET MVC?



What is difference between Viewbag and Viewdata in ASP.NET MVC?..

Answer / Meenakshi Agarwal

{"ViewData is a dictionary object that stores data for a view and can be accessed using key-value pairs, while ViewBag provides dynamic access to ViewData without requiring explicit typing.}n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

What happens when you encounter a continue statement inside the for loop ?

1 Answers  


If I have multiple filters implemented, what is the order in which these filters get executed?

1 Answers  


How to return the JSON from action method in ASP.Net MVC?

1 Answers  


What is the CLR

1 Answers  


What is GUID and why we need to use it and in what condition? How this is created

1 Answers  


What is shadowing?

6 Answers   IBM,


What is partialview in asp.net mvc?

1 Answers  


what is code first approach?

1 Answers   Microsoft,


How to free the memory that is not used by an object in garbage collection?

4 Answers   IBM,


How we can invoke child actions in ASP.Net MVC?

1 Answers  


What is entitycontainer? : Entity framework

1 Answers  


sql related question (outer join, left, right etc) array vs hashtable CRL sqldatareader vs dataset what is WPF, WCF, compare to WinForms Webservices Asp.net MVC vs WebForms?

1 Answers   Avanade,


Categories