我有一个从 sql 获取的数据表,在对每一行进行一些处理后,我在数据表中添加一列以显示处理结果,然后我想将其发送到 asp.net 中的另一个页面,最好的方法是什么? 可以使用会话还是什么?
我尝试使用会话,但我不确定它是否可以,因为很多人使用我的服务器。
DataTable dt = new DataTable();
dt.Columns.Add("img", typeof(string));
dt.Columns.Add("soratvaziat", typeof(string));
dt.Columns.Add("shomaregharardad", typeof(string));
dt.Columns.Add("sharh", typeof(string));
dt.Columns.Add("eghdam", typeof (Boolean));
DataRow dtrow = dt.NewRow(); // Create New Row
dtrow["img"] = "accepted.png"; //Bind Data to Columns
dtrow["soratvaziat"] = "SureshDasari";
dtrow["shomaregharardad"] = "B.Tech";
dtrow["sharh"] = "Chennai";
dtrow["eghdam"] = true;
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["img"] = "attention.png"; //Bind Data to Columns
dtrow["soratvaziat"] = "MadhavSai";
dtrow["shomaregharardad"] = "MBA";
dtrow["sharh"] = "Nagpur";
dtrow["eghdam"] = true;
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["img"] = "canceled.png"; //Bind Data to Columns
dtrow["soratvaziat"] = "MaheshDasari";
dtrow["shomaregharardad"] = "B.Tech";
dtrow["sharh"] = "Nuzividu";
dtrow["eghdam"] = true;
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["img"] = "accepted.png"; //Bind Data to Columns
dtrow["soratvaziat"] = "Mahendra";
dtrow["shomaregharardad"] = "CA";
dtrow["sharh"] = "Guntur";
dtrow["eghdam"] = false;
dt.Rows.Add(dtrow);
RadGrid1.DataSource = dt;
RadGrid1.DataBind();
Session["dt"] = dt;