James
James

Reputation: 1

What is a "NullReferenceError" in ASP.NET MVC?

I keep getting "NullReferenceError" in my output, could someone kindly explain what exactly this statement means.

Upvotes: 0

Views: 51

Answers (2)

Thogek
Thogek

Reputation: 361

If it helps, a decent description of NullReferenceException -- why/when they occur, and how to prevent them -- at http://www.dotnetperls.com/nullreferenceexception

Upvotes: 0

Femaref
Femaref

Reputation: 61437

Somewhere in your code, you are trying to access a member of a reference type, but the variable actually is null. Without code and a stacktrace it's impossible to say what exactly happens. It might be because some parameter is expecting a value but isn't supplied one.

Upvotes: 3

Related Questions