© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
Yume

❔ ASP.NET MVC: Object reference not set to an instance of an object

I'm getting a confusing error in my view, hard to google. It was working before and I don't know what might've caused it. Anyone seen this before or know how I can troubleshoot? Even weirder is I got a different version of this same error a couple lines down with the code
@Html.Partial("~/Views/Shared/_Header.cshtml")
@Html.Partial("~/Views/Shared/_Header.cshtml")
. I removed it and now get the pictured error, even though the Layout code should've been run first??
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

✅ Object reference not set to an instance of an object.
C#CC# / help
10mo ago
"Object reference not set to an instance of an object"
C#CC# / help
17mo ago
Object reference not set to an instance of an object.
C#CC# / help
2y ago
✅ Object reference not set to an instance of an object?
C#CC# / help
2y ago