Abstract Class Property Availability in Parent Class

G

Guest

I have an ascx file that inherits an abstract class. Within this abstract
class are protected properties. I can access these properties within the
page_load event of the parent class, however when I try to access the
properties in the page_init of the parent class, I get an "Object reference
not set to instance of object" error.

I understand the load sequence of a page, but need help initalizing the
abstract class in the page_init so I can use those properties from the base
class.

Thanks,
GP
 
V

VJ

Object reference not set means value is null for property, does not mean
property is not available.. If property is not available, you can't
compile.. So your property is there, just not set to a value Between
page_init and load a piece of code does the initialize for you. I am no ASP
expert, but that would be easy to figure out for you

VJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top