5👍
✅
ViewBag.Months = months;
The above code, the months is a list so how are you dispaying it in the UI, you need to join the list to show it as a string
ViewBag.Months = string.Join(", ", months);
Source:stackexchange.com