Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

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.

Wednesday, March 21, 2012

Need help with TabContainer in DotNetNuke

When I add an AjaxControlToolkit TabContainer to a module, it does not display properly in IE6 or IE7, but it does in Firefox. You can view the problem here:

http://www.websmithing.com/portal/Tabs/tabid/64/Default.aspx

Here is the code:

<%@dotnet.itags.org. Control Language="C#" AutoEventWireup="true" CodeFile="Tabs.ascx.cs" Inherits="DesktopModules_TabTest_Tabs" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"
Height="200px" Width="200px">
<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
</cc1:TabPanel>
</cc1:TabContainer>

using System;
using DotNetNuke;
using DotNetNuke.Entities.Modules;

public partialclass DesktopModules_TabTest_Tabs : PortalModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
}
}
}

I built a very simple user control and put it onto an aspx page and had no problems with viewing it in IE. You can see it here:

http://www.websmithing.com/portal/TabPanel.aspx

So it somehow seems to be a problem related to DotNetNuke...

thanks

Nick

ps. I have posted the question in the DotNetNuke Forums

I want to thank David Anson of Microsoft for finding the solution to this problem. Here was our thread:

Thank you David, that was exactly the problem. The TabContainer isdisplaying properly now. My menus are a little bit off in DotNetNuke,but I'm going to work on fixing the skin rather than going back to theother doctype.

For those who want to know, here is where the fix needs tohappen. In Default.aspx.vb at about line 259, I changed theDocTypeValue from:

'Dim DocTypeValue As String = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"

to:

Dim DocTypeValueAs String ="<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"

once again, thank you!
Nick

- Hide quoted text -

On Dec 4, 2007 10:11 PM, David Anson wrote:

The DOCTYPEs are subtly different and I'm wondering if theproblematic one is leaving the browser in quirks mode (according to myunderstanding of the last paragraph ofhttp://msdn2.microsoft.com/en-us/library/ms535242.aspx).If so, that could be the problem as we don't support quirks mode with theToolkit. Maybe try switching to the same DOCTYPE for both to see if that helps?


I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.