DEC.Objects.MaterialStock objMaterialStock = new DEC.Objects.MaterialStock();
objMaterialStock.StockState = 0;
objMaterialStock.CreateDate = Convert.ToDateTime(DateTime.Now.ToShortDateString());
if (ViewState["objlist"] != null)
{
objlist = (List<DEC.Objects.MaterialStock>)ViewState["objlist"];
}
objlist.Add(objMaterialStock);
ViewState["objlist"] = objlist;
objMaterialStock.StockState = 0;
objMaterialStock.CreateDate = Convert.ToDateTime(DateTime.Now.ToShortDateString());
if (ViewState["objlist"] != null)
{
objlist = (List<DEC.Objects.MaterialStock>)ViewState["objlist"];
}
objlist.Add(objMaterialStock);
ViewState["objlist"] = objlist;
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------程序集“DEC.Components, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”中的类型“DEC.Objects.MaterialStock”未标记为可序列化。
求解决