Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 694721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:53:08+00:00 2026-05-14T02:53:08+00:00

I have a Panel that I’m setting visible=true explicitly. The debugger passes over that

  • 0

I have a Panel that I’m setting visible=true explicitly. The debugger passes over that line and visible still evaluates to False on the next line. Obviously as a result, the Panel is not shown. How is this possible?

pnlValidate.Visible = true;
if (IsPostBack) return;
<asp:Panel ID="pnlValidate" runat="server">
    <asp:Button cssclass="submit2" ID="btnValidate" runat="server" Visible="false" text="Validate" OnClick="btnValidate_Click" /> <br />
    <asp:TextBox ID="txt6sql" runat="server" Visible="false" TextMode="multiLine" Width="500" Height="200" ReadOnly="true" ToolTip="Report SQL Statement" />
</asp:Panel>

ASP.NET 2.0, no other threads or wonky errata that “should” be messing with my members.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:53:08+00:00Added an answer on May 14, 2026 at 2:53 am

    Is your panel nested inside another panel or any other type of container which has Visible set to false?

    For such a situation the behaviour your observed is reproducable. It would make sense to forbid to set visibility to true for the inner container if an outer container is invisible since that means nothing inside must be visible, even not the empty div of the inner panel.

    The Visible property seems to be dependent on the visibility of outer containers, for instance:

    <asp:Panel ID="Panel0" runat="server" Visible="false">
        <asp:Panel ID="Panel1" runat="server" Visible="false">
            Content...
        </asp:Panel>
    </asp:Panel>
    

    This code is as expected (make outer container visible first, then inner container):

    Panel0.Visible = true;
    // Now Panel0.Visible returns true and Panel1.Visible returns false
    Panel1.Visible = true;
    // Now Panel0.Visible returns true and Panel1.Visible returns true
    

    This code is somewhat surprising (make inner container visible first, then outer container):

    Panel1.Visible = true;
    // Now Panel1.Visible returns false (!, your issue) and Panel0.Visible returns false
    Panel0.Visible = true;
    // Now Panel1.Visible returns true (!!) and Panel0.Visible returns true
    

    It seems that setting and getting the Visible property is “asymmetric”: The Setter seems to place a flag in the control, but the Getter to return a calculated value which depends on the visibility of the outer elements and the visibility of the control itself.

    Not sure if this will help you at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have panel that is using group layout to organize some label. I want
I have a panel that draws alot of things. To make drawing effecient I
I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.
I have a panel that is docked to the right side of a windows
I have an Panel control that I need to maintain position across postbacks. I
i have a flow panel that i'm adding extra items to it at runtime
I have a stack panel inside of an expander panel that I programaticaly adds
I have a Java swing application with a panel that contains three JComboBoxe s
I have a log function on my admin panel that checks user input for
I have panel that I have customized. I use it to display text. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.