473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Abstract Class Property Availability in Parent Class

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
Mar 13 '07 #1
1 1727
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

"Galahad" <Ga*****@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
>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

Mar 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard Thomas | last post by:
Hi, I've got an .aspx page with a number of controls on it for setting the values for an object. When the values have been put in, the user clicks on the "Store" button. When I want to edit...
6
by: steve bull | last post by:
I created a usercontrol class, RGBColorSpace, which is derived from an abstract class, ColorSpace, but when I try to click on the design panel for the control I get an error message "Unable to...
8
by: Manuel | last post by:
Hi! If I've a vector filled with abstract classes, can I push in it the derived classes too? Even if derived classes have new methods? I've done some experiments, and it seem I can push the...
0
by: Craig Buchanan | last post by:
i am trying to build an application that uses plugins to extend the business functionality of an application. i've decided to use inheritance of abstract classes as the mechanism to do this. ...
7
by: Brybot | last post by:
Apparently it is not possible for a static class to extend an abstract class? I was wondering how else I might be able to go about my problem here? I have a base class Parent which has a static...
0
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass...
2
by: Joh Smith | last post by:
I have a form called Parent that I mark as abstract (MustInherit). Then I add another form called Child that inherits Parent and implements all Parent abstract methods. It compiles Ok, but when i...
5
by: tshad | last post by:
In VS 2003, I am setting up an abstract class that is setting up classes for each datatype of VB.Net (as well as C#). I am trying to set it up so that most of the work is done in the Abstract...
2
by: parez | last post by:
how do i put an abstract property ( or something that lets me know that derived class has not implemented that particular property ) in base form in my win forms project? if i make the base form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.