Sounds like you are using PageMethod to get your data and trying the above thing in that method.
You need to know that, Page Methods cannot interact with the instance properties and methods of your Page class, because a page method call creates no instance of the Page or any of its controls. Hence you are unable to access it and get an error.
Have a look here, a good read:
Why do ASP.NET AJAX page methods have to be static?[
^]
Still, if you really want it then there is a round about way to accomplish it like the following:
public static void staticMeth(MyClass obj)
{
obj.nonStatic();
}