此页面的状态信息无效,可能已损坏(仅限IE)

时间:2012-05-14 14:24:00

标签: asp.net internet-explorer c#-4.0 jquery viewstate

我已经看到所有其他页面都有这个问题,但没有多少研究解决了我的问题。我收到“状态信息对此页面无效并且可能已损坏”错误。我的页面第一次加载正常。该页面包含一个div,其中包含用于更改页面信息的选项卡,并且选项卡会动态加载并链接到其他页面。标签使用jquery。在不改变页面上的任何内容的情况下,当我尝试通过单击到达此页面的链接重新加载此页面,或者甚至通过单击菜单栏中转到其他页面的任何链接时,我发生此错误。同样,这只发生在IE中,我在我的代码中放置了断点,它永远不会回到服务器。

<%@ Page Language="C#" MasterPageFile="~/Templates/Main.Master" AutoEventWireup="true" 
    CodeBehind="Reporting.aspx.cs" Inherits="Pegged.Reporting" Title="Workforce Planning Report" %>

<%@ Register Src="Controls/ucWebPageNavigation.ascx" TagName="ucWebPageNavigation"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    $(function () {
        $("#tabs").tabs({
            ajaxOptions: {
                error: function (xhr, status, index, anchor) {
                    $(anchor.hash).html(
                        "Couldn't load this tab. We'll try to fix this as soon as possible.");
                }
            }
        });
    });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="IconLinks" class="TopLinks">
        <uc1:ucWebPageNavigation ID="ucWebPageNavigation1" runat="server" />
    </div>
    <div id="divContainerReport" class="container_12">
        <!--Facility Tabs-->
        <div id="tabs">
        <ul id="FacilityTabs" runat="server" ></ul></div>
        </div>

</asp:Content>

这是在页面加载时加载选项卡的代码:

ServicesDLL.Services ps = new ServicesDLL.Services();
string encryptString = "";
string encryptString2 = "";

encryptString = ps.EncryptQueryString("Test");
encryptString2 = ps.EncryptQueryString("Testing");
string innerhtml = "<li><a id=\"id1\" href=\"ReportFacility.aspx?facility=" + encryptString + "\">Test</a></li><li><a id=\"id2\" href=\"ReportFacility.aspx?facility=" + encryptString2 + "\">Testing</a></li>";
FacilityTabs.InnerHtml = innerhtml;

这是标签加载的页面:

<%@ Page Title="" Language="C#" MasterPageFile="~/Templates/Popup.Master" AutoEventWireup="true" CodeBehind="ReportFacility.aspx.cs" Inherits="Pegged.ReportFacility" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="divReportView" class="grid_8 BlueBorder">
<p id="testText" runat="server"></p>
</div>
</asp:Content>

0 个答案:

没有答案