Apr 20, 2017, 3:39 AM
[CLOSED] Using ContentPlaceHolder will Makes "The state information is invalid for this page and might be corrupted" Exception
Hello,
I found when i use master.site to layout my page, <ContentPlaceHolder> will make page crash when i press some button to do DirectEvent.
snapshot(The meaning of the exception is "The state information is invalid for this page and might be corrupted", ArgumentNullException cannot be null)
site.master
I found when i use master.site to layout my page, <ContentPlaceHolder> will make page crash when i press some button to do DirectEvent.
snapshot(The meaning of the exception is "The state information is invalid for this page and might be corrupted", ArgumentNullException cannot be null)
site.master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="TestWebForm.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server"/>
<ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
<Content>
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</Content>
</ext:Viewport>
</form>
</body>
</html>
about.aspx<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="TestWebForm.About" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<ext:GridPanel ID="gridOrg" runat="server" Title="医疗机构" ColumnLines="true" Height="200">
<TopBar>
<ext:Toolbar ID="GridOrgToolbar" runat="server">
<Items>
<ext:Button ID="BtnAdd" Text="新增" runat="server">
<DirectEvents>
<Click OnEvent="OnOrgCreate" />
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
</ext:GridPanel>
</asp:Content>
about.aspx.csnamespace TestWebForm {
public partial class About : Page {
protected void Page_Load(object sender, EventArgs e) {
}
protected void OnOrgCreate(object sender, DirectEventArgs e) {
}
}
}
Ted
Last edited by fabricio.murta; Apr 27, 2017 at 2:55 AM.