Referencing from Web page Propertys of control with in another control

Joined
Jun 28, 2006
Messages
5
Reaction score
0
Referencing from Web page Form Propertys of control with in another control

I have developed problem working with controls I have built in getting reference to property to work.
I have control called CEOSH_TitlePage that has the CEOSH header and information to display to user on every web page.
Inside of this control I have several properties that has user's name, access level, etc.
If I put this control on page and I can reference all the properties in CEOSH_TitlePage controls without problem using the
Protected withevents CEOSH_TitlePage1 as Projectname.CEOSH_TitlePage
Here the problem.
I have two other controls that has additional different information that needs to be displayed at the top of page after the CEOSH_TitlePage information.
I have the CEOSH_TitlePage control on this these two different controls called Top_Page and Top_Page_No_Buttons.
On webform I have
Protected withevents CEOSH_TitlePage1 as Projectname.CEOSH_TitlePage
and can reference the properties in the code but when I run the code it says I have the following error:
Object reference not set to an instance of an object and flags the statement CEOSH_TitlePage1.FacilityName="CEOSH"
Not sure how to get around this problem.
I really do not want to duplicate the code into two different controls, and I know their is away around this, just have not figured it out.
Any ideas?
 
Last edited:
Joined
Jun 28, 2006
Messages
5
Reaction score
0
Referencing from Web page Form Propertys of control with in another control Update

I change in the control area of the parent Control to
comment out the normal 'Inherits System.Web.UI.UserControl
and put inherits name of project dot name of child control.
Now the reference show up in the webform under the Parent
protected withevents parentcontrol1 as name of project.parentcontrol.
All the procedures and properties in the child control run except for the Get propertiess. None of GET properties run. In debug I set breakpoints so I know that set properties gets the correct information from the webform so I know this is working.
Putting breakpoint on every line in the Get Property to stop execution so that I know that area of code is being executed never happens.
Any Ideas to get the GET Properties to execute?
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top