0
我有我的頁面網格有四列與多行 用戶ID的用戶名和STATEID Statename的數據網格行中收集保存和顯示在另一頁asp.net
其收集我應該用數據發送到另一個使用會話頁面 我的代碼是
string[] strArray = new string[] {};
foreach (GridViewRow gr in gvCompany.Rows)
{
strArray =new string[4] {new[] {gr.Cells[0].Text}.ToString(), new[] {gr.Cells[1].Text}.ToString(), new[] {gr.Cells[2].Text}.ToString(),new[] {gr.Cells[3].Text}.ToString()};
}
Session["List"] = strArray;
Response.Redirect("Tid.aspx?Mode=List");
TID網頁上我的代碼是
string[] ls = new string[] { };
ls =(string[]) Session["List"];
foreach (string st in ls)
{
//get each cell
}
但ST的價值體系.string而不是價值