我有一个名为 Site.master 的主页
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Fancybox.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<%-- JQUERY--%>
<script src="<%= ResolveClientUrl("~/Scripts/jquery-1.7.2.js") %>" type="text/javascript">
</script>
<%-- JQUERYui --%>
<script src="<%= ResolveClientUrl("~/jquery-ui-1.8.21.custom.min.js") %>"
type="text/javascript"></script>
<link rel="stylesheet" href="<%= ResolveClientUrl("~/Styles/jquery-ui-1.8.21.custom.css") %>"
type="text/css" media="screen" />
<%-- FANCYBOX VERSION 1.3.4--%>
<script type="text/javascript" src="<%= ResolveClientUrl("~/Scripts/jquery.fancybox-1.4.3.min.js") %>">
</script>
<link rel="stylesheet" href="<%= ResolveClientUrl("~/Styles/style-fancybox-1.3.4.css") %>"
type="text/css" media="screen" />
<script type="text/javascript" >
$(document).ready(function () {
$("#LoginLightbox").fancybox({
scrolling: "no"
});
});
</script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<asp:ScriptManager runat="server">
</asp:ScriptManager>
<div class="page">
<div class="header">
<div class="title">
<h1>
My ASP.NET Application
</h1>
<a href="Login.aspx?iframe=true" id="LoginLightbox">PRESIONAR</a>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
当我单击链接 Presionar 时,fancybox 显示为 iframe。
此 iframe 是名为 litebox.master 的其他 Masterpage
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="litebox.master.cs" Inherits="Fancybox.litebox" %>
<!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>
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
使用 litebox.master 的页面是 Login.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/litebox.Master" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="Fancybox.login" %>
<%@ Register TagPrefix="uc1" TagName="Login" Src="~/control/Login.ascx" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="head">
<link rel="stylesheet" href="Template/Styles/style.css" type="text/css" media="screen" />
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<uc1:Login ID="LoginControl" runat="server"></uc1:Login>
</asp:Content>
最后用户控件 Login.ascx 是
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="login.ascx.cs" Inherits="Fancybox.control.login" %>
<div style="width:400px;height:400px;background-color:Blue">
<div style="color:White">Hola</div>
<asp:TextBox ID="txtnombre" runat="server"></asp:TextBox>
<asp:TextBox ID="txtcontrasena" runat="server"></asp:TextBox>
<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="HEYYY">
</asp:CustomValidator>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnregistro" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:Button ID="btnregistro" runat="server" onclick="btnregistro_Click" ValidationGroup="grupoValidacionLoginUsuario"/>
</div>
当我第一次按下按钮 btnregistro 时,它运行良好,如果页面无效,则显示 heyyy,如自定义验证器中所述。问题是当我按下以下按钮时,它会中断
Firefox 控制台向我抛出此错误
Timestamp: 08/08/2012 18:15:42
Error: Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: the state information is invalid for this page and might be corrupted.
Source File: http://localhost:6037/Scripts/jquery-1.7.2.js
Line: 2121
它打破jquery的行是
jQuery.dequeue( elem, type );
请帮帮我!我已经与这个错误作斗争了好几个星期,我不知道还能做什么,我做了很多谷歌但没有找到任何解决方案!!!