tomouse
Technical User
- Aug 30, 2010
- 50
I think maybe this is one I've been staring at too long. I have many pages based on the same structure. This includes a panel which is set to visible=false most of the time. When user carries out an update operation, the panel is made visible and an image and a label are set to reflect the result of the update (success or failure).
In all but one of my pages this works fine. However, in the page I've been working on most recently, the text and ImageURL of the items contained within the panel keep reverting back to the values that are set at design-time in the aspx file. Here is the panel:
So I put a watch on the text value of the label as it is set in the code after the update - everything seems fine (the watch shows that lblResultado.text = "Update completed successfully"). But then when the code is finished and the page displays, the text has reverted back to the value originally set at design time ("**resulttext**").
If I include a blank asp:button (outside of the panel) and click it to force a postback, the label then shows as the desired "Update completed successfully". What is going on here?
In all but one of my pages this works fine. However, in the page I've been working on most recently, the text and ImageURL of the items contained within the panel keep reverting back to the values that are set at design-time in the aspx file. Here is the panel:
Code:
<asp:Panel runat="server" ID="pnlResultado" Visible="false" >
<div id="DivResultado">
<asp:Image ID="imgAlerta" runat="server" />
<asp:Label ID="lblResultado" text="**resulttext**" runat="server"></asp:Label>
</div>
</asp:Panel>
If I include a blank asp:button (outside of the panel) and click it to force a postback, the label then shows as the desired "Update completed successfully". What is going on here?