How to create dynamic property with the help of ViewBag in Asp.net MVC?
8696
17-Sep-2011
Updated on 22-Sep-2020
Chris Anderson
17-Sep-2011List<string> countries=new List<string>();
countries.Add("India");
countries.Add("USA");
countries.Add("Canada");
ViewBag.Countries=countries; //here Countries is a dynamic property associated with the Viewbag.