ASP:Panel, UpdatePanel WTF, blank panels

    protected void Page_Load(object sender, EventArgs e)
    {    
    }

    protected void uxContinue_Click(object s, EventArgs e)
    {
        pnl_intro.Visible = false;
        pnl_main.Visible = true;
    }
<asp:ScriptManager ID="ScriptManager1" runat="server" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>

<asp:Panel ID="pnl_intro" runat="server">
  Lorem ipsum is sur de amuset...
  <asp:Button ID="uxContinue" runat="server" Text="Continue" onClick="uxContinue_Click" />
</asp:Panel>

</ContentTemplate>
</asp:UpdatePanel>

<asp:Panel ID="pnl_main" runat="server">
  Lorem ipsum is sur de amuset... Welcome to the main portion ...
</asp:Panel>

This is a common thing to do; you click the button and the panels switch out.

On our development server, all is well. On our production server, when you click the button, the panels swap out, but the pnl_main content is completely blank.

Solution: Move the second panel into the UpdatePanel.

I don’t know why this is quirky like it is.

Advertisements