D
Donald Williamson
Hope someone can help me with this one.
I have two user controls - 'Footer' and 'SideBar'. The Footer control
contains the SideBar control.
From the main page, I'm wanting to pass in a visible property to Footer
which would tell it to whether to display the SideBar control
Here's the main page that calls the Footer control:
<USER:SITEFOOTER id="Footer" DisplaySideBar=True
runat="server"></USER:SITEFOOTER>
The Footer page contains the following property:
Property DisplaySideBar () As Boolean
Get
Return dispayBar
End Get
Set(ByVal Value As Boolean)
displayBar = Value
End Set
End Property
The Footer page then calls the SideBar
<USER:SideBar id="Bar" runat="server" DisplaySideBar= <%#DisplaySideBar%> >
The problem is that DisplaySideBar does not appear to be getting set or even
working. If I hardcode the following, it works fine:
<USER:SideBar id="Bar" runat="server" DisplaySideBar= true >
or
<USER:SideBar id="Bar" runat="server" DisplaySideBar= false >
So the question is what's the right way to do this? Please let mw know if
you need any more info. Thanks.
- Donald
I have two user controls - 'Footer' and 'SideBar'. The Footer control
contains the SideBar control.
From the main page, I'm wanting to pass in a visible property to Footer
which would tell it to whether to display the SideBar control
Here's the main page that calls the Footer control:
<USER:SITEFOOTER id="Footer" DisplaySideBar=True
runat="server"></USER:SITEFOOTER>
The Footer page contains the following property:
Property DisplaySideBar () As Boolean
Get
Return dispayBar
End Get
Set(ByVal Value As Boolean)
displayBar = Value
End Set
End Property
The Footer page then calls the SideBar
<USER:SideBar id="Bar" runat="server" DisplaySideBar= <%#DisplaySideBar%> >
The problem is that DisplaySideBar does not appear to be getting set or even
working. If I hardcode the following, it works fine:
<USER:SideBar id="Bar" runat="server" DisplaySideBar= true >
or
<USER:SideBar id="Bar" runat="server" DisplaySideBar= false >
So the question is what's the right way to do this? Please let mw know if
you need any more info. Thanks.
- Donald