Panel visible=true has no effect

Posted by tsilb on Stack Overflow See other posts from Stack Overflow or by tsilb
Published on 2010-03-29T15:38:10Z Indexed on 2010/03/29 15:43 UTC
Read the original article Hit count: 382

Filed under:
|

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>

alt text

ASP.NET 2.0, no other threads or wonky erratta that "should" be messing with my members.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about visibility