D
darrel
Karl pointed me towards the use of interfaces to share information between
controls. I'm getting the hang of it, but still running into some
logic/syntax problems.
What I'm trying to do is have a usercontrol set a property. I then want the
parent page to read that property, and set a new property defined within an
interface. I then want ANOTHER usercontrol to be able to access that
property from the interface.
Ultimately, I want one UC to be able to set a variabel that other UC's on
the page can read without any of the UC's needing to know what the parent
page actually is.
The 'getVariables' usercontrol that sets the variable is set up as such:
---------------------------------------------------------
Private testVariable as String = "monkey"
Property PropTestVariable as string
Get
return testVariable
end Get
set
testVariable = value
end set
end Property
---------------------------------------------------------
the parent page is trying to read it as such:
---------------------------------------------------------
public UC_getVariables as getVariables
Public testVariableFromGetVariables = UC_getVariables.PropTestVariable
---------------------------------------------------------
The problem is that the above gives me the old Object reference not set to
an instance of an object. and is where I'm currently stuck on things. Is
there any obvious syntax problems or logic problems in my above code?
-Darrel
controls. I'm getting the hang of it, but still running into some
logic/syntax problems.
What I'm trying to do is have a usercontrol set a property. I then want the
parent page to read that property, and set a new property defined within an
interface. I then want ANOTHER usercontrol to be able to access that
property from the interface.
Ultimately, I want one UC to be able to set a variabel that other UC's on
the page can read without any of the UC's needing to know what the parent
page actually is.
The 'getVariables' usercontrol that sets the variable is set up as such:
---------------------------------------------------------
Private testVariable as String = "monkey"
Property PropTestVariable as string
Get
return testVariable
end Get
set
testVariable = value
end set
end Property
---------------------------------------------------------
the parent page is trying to read it as such:
---------------------------------------------------------
public UC_getVariables as getVariables
Public testVariableFromGetVariables = UC_getVariables.PropTestVariable
---------------------------------------------------------
The problem is that the above gives me the old Object reference not set to
an instance of an object. and is where I'm currently stuck on things. Is
there any obvious syntax problems or logic problems in my above code?
-Darrel