Relative Content

Tag Archive for c#asp.netasp.net-mvcasp.net-coreviewmodel

I cannot fetch the data from viewmodel in ASP.NET Core MVC. My values for “input-asp-for” looks null in my view. How can I fix this problem?

When I go to the view, I see some input asp-for fields as null, even though they aren’t null. In ViewModel, the reference from other models are given properly, I don’t know where the mistake is located. I am trying to take some data which are given in the login(name, phone, etc) as output. My data is not shown in localhost. Also my foreach section does not work.