label text not persisting on a published website
I have a label on my master page with a default text
<dxe:ASPxLabel ID="m_Label" runat="server" Font-Bold="True" 
    ForeColor="White" RightToLeft="True" Text="LabelText">
                    </dxe:ASPxLabel>
And then I set the text on the Master page
if (!Page.IsPostBack && !Page.IsCallback)
{
 if(condition)
 {
   m_Label.Text="one"
 }
 else
 {
  m_Label.Text="two"
 }
}
If I run my web page from the source code it displays the correct text i开发者_开发百科.e one or two. But if I publish my web page and then open the page it always says "LabelText"
Am I missing anything?
Just a thought, but is the page being cached? I noticed the code is set to run when NOT a postback (i.e. this is a GET request) and as such, could be subject to caching. Try CTRL+F5 in Internet Explorer to force a refresh. Alternatively, are you using a proxy server? That may also be caching the page.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论