"国家信息对于此页面无效,可能已损坏" [英] "The state information is invalid for this page and might be corrupted"
问题描述
我的asp.net应用程序有一个母版页,内容页和用户控制。
My asp.net application has a master page, a content page and a user control.
在主母版页有其显示的fancybox作为一个iframe的链接。
iframe中有一个表单登录到该页面。该iframe是一个新的母版有有登录的用户控件的登录的页面内容。
In the main master page there is a link which displays a fancybox as an iframe. The iframe has a form to login to the page. The iframe is a new masterpage which has the content page of the login which has the user control of the login.
在按钮上的用户点击登录服务器端检查凭据是否OK,如果没有它会显示一个消息。所有这一切都与一个定制的验证。
When the user clicks on the button to login the server side checks if the credentials are ok and if not it displays a message. All this with a custom validator.
我的问题是,当用户第一次点击按钮登录它检查确定,但如果凭据不是很好,用户retypes他们,我得到火狐以下错误
My problem is that when the user first clicks the button to login it checks ok but if the credentials are not good and the user retypes them i get the following error on firefox
Error: Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: the state information is invalid
for this page and might be corrupted http.../jquery-1.7.2.js
在母版我有
<%-- jQuery --%>
<script src="<%= ResolveClientUrl("~/Template/Scripts/jquery-1.7.2.js") %>"
type="text/javascript"></script>
<%-- jQueryUI --%>
<script src="<%= ResolveClientUrl("~/Template/jqueryui/js/jquery-ui-1.8.21.custom.min.js") %>"
<script type="text/javascript" src="<%= ResolveClientUrl("~/Template/Scripts/jquery.fancybox-1.4.3.min.js") %>">
</script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$("#LoginLightBox").fancybox({
width: 300,
height: 750,
scrolling: "no"
});
$("#RegistroLightbox").fancybox({
width: 300,
height: 750,
scrolling: "no"
});
});
</script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<body id="page1">
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server">
</asp:ScriptManager>
<div >
<li style="display:inline"><a class="labelsTipolinks" id="LoginLightBox" href="Login.aspx?iframe=true">Login</a></li>
<li style="display:inline;color: #C53005;">|</li>
<li style="display:inline"><a class="labelsTipolinks" id="RegistroLightbox" href="RegistroUsuario.aspx?iframe=true">Registro</a></li>
在页面内容:
<%@ Register TagPrefix="uc1" TagName="Login" Src="~/Controles/Login.ascx" %>
和最终用户控制:
<div style="margin-top: 20px">
<asp:UpdatePanel runat="server" ID="updPanelLoginIncorrecto">
<ContentTemplate>
<asp:CustomValidator ForeColor="Red" OnServerValidate="usuarioExistente_Validation"
Display="Static" Font-Size="Small" runat="server" ID="vldLogin"
ValidationGroup="grupoValidacionLoginUsuario"
Text="<%$ Resources:LocalizedText, MsjError_LoginIncorrecto%>">
</asp:CustomValidator>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnLoginLightbox" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="tableContent" style="float: right;">
<asp:Button CssClass="button" ID="btnLoginLightbox" Text="Login" runat="server" OnClick="btnLogin_Click"
ValidationGroup="grupoValidacionLoginUsuario" />
</div>
请帮忙这是怎么回事我疯了。我已经尝试启用eventvalidation设置为false,会话response.cache.setno ...等,但没有奏效。
Please help this is going me crazy. I have already try enable eventvalidation set to false, sessions, response.cache.setno... etc but none worked.
修改
在那里我得到的错误行是jQuery的1.7.2.js,并且是该说jQuery.dequeue(ELEM,型)行;
The line where i get the error is on jquery 1.7.2.js and is on the line that says jQuery.dequeue( elem, type );
编辑2
我最终把的fancybox作为主内的内联元素,但它不是我想要的解决方案。请帮我!!!!!
I ended up putting the fancybox as an inline element inside the master but it is not the solution i want. Please help me out!!!!!
推荐答案
试图周后,我试图把类型:IFRAME和神奇,它的工作!我不知道有什么可以做,但现在它的工作原理:)
因此,code将是:
After weeks of trying, i tried putting type:"iframe" and magically it worked! I have no idea what has to do but now it works :) So the code would be:
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$("#LoginLightBox").fancybox({
type: "iframe",
width: 300,
height: 750,
scrolling: "no"
});
$("#RegistroLightbox").fancybox({
type: "iframe",
width: 300,
height: 750,
scrolling: "no"
});
});
</script>
这篇关于&QUOT;国家信息对于此页面无效,可能已损坏&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!