Sir, I am getting object Reference not set to an instance of an Object Error in the Cell Enter Event of Grid View in ADO.NET.
One column in this gird is empty( Is this cause for this error?)
What is the cause to this error in c#?
in which case, this happen?
Object Reference not set to an instance of an Object Error
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jignesh TrivediRank #16 · 50.3K reputationPosted Oct 14, 2013, 8:36 PM EDT
generally this ocurred when you trying to access property of null object or trying to convert it to the other type.
for example
i have one class called A and has property name
A a =null;
now i am trying to access it property...
a.Name
it give me error......
this sis an example there is somany reason to this error.
please share your code so that we can help you.
hope this will help you.
Bineesh ViswanathRank #1,680 · 907 reputationPosted Oct 14, 2013, 8:51 PM EDT
In my product, I didn't passed the Unit for the product.
Then I updated the product with giving a unit. Then the problem been solved.
Thank you for your help.