我想添加會話[「i」的]用的詞添加到會話ASP.NET C#
目前它將只顯示了一組結果
例如的School1 11/10/2011 14/11/2011 GCSE AAA
我想補充多套,但他們似乎並沒有被獲得存儲在Session
例如
School1 11/10/2011 14/11/2011 GCSE AAA
School2 2012年11月10日14/11/2012 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);
}
}