MVC5 / C# – Cannot perform runtime binding on a null reference
There are two issues in your code: Consider this: This simplified piece of code throws Cannot perform runtime binding on a null reference since speakers is not defined (null reference). You can fix it by defining speakers in the dynamic ViewBag before the loop: The second issue: speakers in your code is a List, you might want to define ViewBag.speakers as a List<List<string>> and call .Add(speakers) instead … Read more