我想添加一个具有更多结果的 Session["i"]
目前它只会显示一组结果
例如 School1 11/10/2011 14/11/2011 GCSE AAA
我想添加更多集合,但它们似乎没有存储在 Session 中
例如
School1 2011 年 11 月 10 日 2011 年 11 月 14 日 GCSE AAA
School2 2012 年 11 月 10 日 2012 年 11 月 14 日 ALevels AAA
Education addResults = new Education(schoolName, fromDate, toDate , qualification , grades);
Session["i"] = (addResults );
//schoolarraylist.Add(addResults );
foreach (Education currentschool in schoolarraylist)
{
Session["i"] = currentschool.Schoollocation + "," + currentschool.Datefrom + "," + currentschool.Dateto + "," + currentschool.Qualifications + "," + currentschool.Grade + "<br />";
string tmp = Session["i"].ToString();
string[] sb = tmp.Split(',');
string [] ii = new string[sb.GetUpperBound(0) + 1];
for (int i = 0; i <= sb.GetUpperBound(0); i++)
{
ib[i] = (sb[i]);
}
foreach (string j in ii)
{
Response.Write(ii);
}
}