I have very strange situation: I have asp:panel in my aspx code, in code behind I try to set up visibility of it. This is code
divDiscountCodeCongratulation.Visible = true;
code in aspx
<asp:Panel ID="pan1" runat="server">
<asp:Panel class="sbox-gratulacje" ID="divDiscountCodeCongratulation" runat="server" >
<asp:Literal ID="LitDiscountCodeCongratulation" runat="server" Text="Gratulacje "></asp:Literal>
<asp:Literal ID="litDiscountInfoFromCode" runat="server"></asp:Literal>
<asp:LinkButton ID="btnDiscountCodeCancel" runat="server" Text="Cofnij" OnClick="btnDiscountCodeCancel_Click" />
</asp:Panel>
</asp:Panel>
I put breakpoint on this line, just after it I have still false value (default value). The same situation is when I try to set it in Immediate Window.
Does anyone know why this happen??
All parents of “divDiscountCodeCongratulation” have to have set Visibility to true.
Are you sure that pan1 is visible. If it is invisible that is expected behavior.