Last post Nov 17, 2017 03:47 AM by a2h
Nov 17, 2017 03:00 AM|Barsik_The_CaT|LINK
I add a string to the ViewBag in my action like this
ViewBag.MyString = "Test";
But when I try to access it in respective view like this
That field is empty. Same happens if I try to pass a list or some object this way. What am I doing wrong? The same code is shown on every website and I used it in my previous project.
Nov 17, 2017 03:47 AM|A2H|LINK
Change the ViewBag Property name from MyLine to MyString