views:

779

answers:

2

Hello. I have a problem with FireFox and ASP.NET UpdatePanel. I have in a form a checkbox and an UpdatePanel. When I check the checkbox, an asp:panel which is into the UpdatePanel should become visible.

<asp:CheckBox ID="cbMoreOptions" runat="server" Text="plus d'options" AutoPostBack="True" OnCheckedChanged="cbOptions_CheckedChanged" /> 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
  <ContentTemplate>
    <asp:Panel ID="Panel1" runat="server" Visible="false"> 
       sssssssss
    </asp:Panel>
  </ContentTemplate>
  <Triggers>
    <asp:AsyncPostBackTrigger ControlID="cbMoreOptions" EventName="CheckedChanged" /> 
  </Triggers>
</asp:UpdatePanel>

Everything is working fine but not after I refresh the page while the checkbox is checked. If this is happening, the checkbox rest checked the page doesn’t make postback more to the server. The firebug shows that the page gets a response and when I verify the its content I have en error 500 which tell that the information of the page is corrupt. All this is happening only in Firefox. In IE8 and Google Chrome everything is ok.

Does anybody have an idea how can I avoid this? It’s a bug of Firefox? All the weird comportment continues until I make enter into the URL textbox. Even if I make F5 nothing happens. What is the difference between F5 and enter into the URL? They shouldn’t have the same result?

Thanks a lot.

A: 

Have you tried placing the checkbox "cbMoreOptions" inside the UpdatePanel?

Place in inside the UpdatePanel ContentTemplate section and set an AsyncPostBackTrigger for the CheckBox.

chinna
A: 

We had this problem a long time ago and it was the way firefox uses in-memory cache to store the state of a page which messes up the way ASP.NET handles VIEWSTATE hidden field. Check if caching turned on for your aspx pages and disable it.

Edit: Here's a link that explains it in detail.

Chetan Sastry