Question : Invalid object reference error

Hi,

When i compile my aspx application its giving me this error, its not showing the page where the error is. can any one help me in finding solution

Thanks
Rajeeva

Answer : Invalid object reference error

This happens if you are defining an object variable and do not initialize it.
For example. You wrote a class MyClass and use it as follows:

MyClass myClass;
myClass.doSomething();

will give the error.

MyClass myClass = new MyClass();
myClass.doSomething();

would work.
Random Solutions  
 
programming4us programming4us