© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
SkeletonBill

❔ MVC - data is being passed to view, but not displayed

My app worked fine earlier and somehow I broke it, and I do not know how.

My model is full of data, and by putting a breakpoint in the razor code I can see that it is being passed to the view as well. However, once the view is rendered, the data is not there. See the total property in the screenshots below.

To further confuse things, this is only happening when using lambda expressions. I put a
<span>@Model.Total</span>
<span>@Model.Total</span>
line in just to test, and it is displaying the data in the view.

Any ideas? Clearly I broke something but I have no idea what I did.
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Image is not being displayed On Azure
C#CC# / help
3y ago
❔ MVC Tuple to View problem
C#CC# / help
3y ago
Data Grid View is not showing data.
C#CC# / help
2y ago