Monday, March 26, 2012

Multiview inside updatepanel, Firefox error on refresh

Hi, I got this piece of code:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" EnableEventValidation="true"%><%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server">  <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>     <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex=0> <asp:View ID="View1" runat="server"> aaa<asp:Button ID="Button1" CommandName="NextView" runat="server" Text="Next" /></asp:View> <asp:View ID="View2" runat="server"> bbb<asp:Button ID="Button2" CommandName="PrevView" runat="server" Text="Prev" /> bbb<asp:Button ID="Button4" CommandName="NextView" runat="server" Text="Next" /></asp:View> <asp:View ID="View3" runat="server"> ccc<asp:Button ID="Button3" CommandName="PrevView" runat="server" Text="Prev" /></asp:View> </asp:MultiView> </ContentTemplate> </asp:UpdatePanel> </form></body></html>

So basically it's just a multiview inside an updatepanel. It works when used properly, but in FireFox (not in IE and Opera), I get a little error. Say on the first view, I press next. Then I refresh the browser. Unlike when there's no update panel, the view resets to the first view. [This is not the MAIN problem, but help here would also be welcome].

Now, after the refresh if I press next, I get this error in FireFox(again, not in IE or Opera):

The state information is invalid for this page and might be corrupted.

Could someone give me a fix for this problem? I'd also like to know if it's possibe to retain the view on refresh instead of it resetting to the first one.

Thanks.

I copied your multiview and ran it, it works fine for me under FireFox 2.0.0.1

The only different is that my scriptmanager containsEnablePartialRendering="true"

Try it again or create a new Ajax WebSite for testing ... Good Luck.


Hi,

Thanks for the reply. However, I just can't get it to work. I created new ajax enabled sites (both on file system and IIS, thinking maybe it's an IIS setting), didn't help. I'm running 2.0.0.1 of FF - the same as you.

Could you try

www.funkybears.com/test.aspx

On the first page, hit next. Then use the refresh button of firefox. Click next after the page loads. I'm getting the error right then.

Also, if I don't use an update panel, if I hit refresh, the currently selected view shows up. With the updatepanel, it always returns to the first view. Is there a way to counter this?

Thanks.


Bump :)
I tried your URL, it works fine under both browser IE7 and FF.

No comments:

Post a Comment