私はこのような私のページでビューステートを宣言した:Viewstateでテーブルのシリアル化を修正する方法は?
public class TMP_RequestCourse
{
public int CourseCode;
public string CourseTitle;
public int PriorityID;
}
public TMP_RequestCourse T_RequestCourse
{
get
{
if (ViewState["TMP_RequestCourse"] == null)
return new TMP_RequestCourse();
return (TMP_RequestCourse)ViewState["insertMode"];
}
set { ViewState["TMP_RequestCourse"] = value; }
}
が、ページがロードされたときに、私は次のエラーを受け取る:
Type 'App.UI.Pages.EduRequestEdit+TMP_RequestCourse' in Assembly 'App.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.