Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Setting Nested User Controls Visible Property

Reply
Thread Tools

Setting Nested User Controls Visible Property

 
 
Donald Williamson
Guest
Posts: n/a
 
      11-07-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide textbox / Make textbox not visible (NOT USING visible property) Jurjen de Groot ASP .Net Web Controls 0 05-19-2008 09:50 AM
Setting the visible property to a group of controls Samuel Shulman ASP .Net 1 06-20-2006 09:33 AM
Setting a controls property in the .aspx : Visible=<%#...%> Andrew Backer ASP .Net 2 06-17-2005 04:36 AM
Panel.Visible = True also make child controls visible. spamfurnace ASP .Net 1 05-24-2004 03:07 AM
User control not visible when setting .Visible = true; Andrea Williams ASP .Net Web Controls 4 01-28-2004 10:22 PM



Advertisments