How to check ViewBag contains a specific string – Asp.net
In controller I have: string[] checkedBoxes ViewBag.Funds = checkedBoxes; checkedBoxes is posted by a form in the view page. How do I check inside the view if ViewBag.Funds contains a specific string? I tried: @if (ViewBag.Funds.ContainsKey("a")) { } I got…