这个是测试的页面
正式页面出错情况是一样的
代码如下
- C# code
using System;using System.Data;using System.Configuration;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using ChinaCustoms.Framework.DeluxeWorks.Web.Library.MVC;using ChinaCustoms.Framework.HB.Web.WebControls;using ChinaCustoms.Framework.DeluxeWorks.Web.Library;using HGFinancialModels;using HGFinancialBLL;using HGFinancialComponent;using ChinaCustoms.Framework.HB.DataObjects;using ChinaCustoms.Framework.DeluxeWorks.Library.Core;using ChinaCustoms.Framework.DeluxeWorks.Library.OGUPermission;using ChinaCustoms.Framework.DeluxeWorks.Library.Principal;public partial class aa : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { InitData(); } /// <summary> /// /// </summary> [Serializable] public class DemoPageData { private t_hg_meet baseInfo = null; private string resourceID = string.Empty; private bool isNew = false; /// <summary> /// 处置单主对象 /// </summary> public t_hg_meet BaseInfo { get { if (this.baseInfo == null) { if (this.isNew) this.baseInfo = GetNewBaseInfo(); } return this.baseInfo; } } /// <summary> /// 是否新建 /// </summary> public bool IsNew { get { return this.isNew; } set { this.isNew = value; } } /// <summary> /// 构造方法,用于文件夹打开等场景 /// </summary> /// <param name="resourceID"></param> /// <param name="scene"></param> public DemoPageData(string resourceID) { this.resourceID = resourceID; } /// <summary> /// 构造方法,用于通过类型创建表单 /// </summary> public DemoPageData() { this.IsNew = true; } /// <summary> /// 初始化部分新拟稿数据 /// </summary> private t_hg_meet GetNewBaseInfo() { t_hg_meet baseInfo = new t_hg_meet(); baseInfo.Meet_id = UuidHelper.NewUuidString(); return baseInfo; } } private DemoPageData ViewData { set { this.ViewState["ViewData"] = value; } get { return (DemoPageData)this.ViewState["ViewData"]; } } private void InitData() { string id = WebUtility.GetRequestQueryString("resourceID", string.Empty); this.ViewData = (id == string.Empty) ? new DemoPageData() : new DemoPageData(id); }}
------解决方案--------------------------------------------------------
t_hg_meet
这个呢?
有没有[Serializable]
这个不允许可序列化的话也会报错的