取出session

来源:百度知道 编辑:UC知道 时间:2024/05/15 01:19:27
把session的东西取出在保持到别的表里,代码 谢谢
把session的东西取出在保持到别的表里,代码写完整 谢谢

不知道你保存在别的表里是什么意思@@
如果直接取Session直接用Session["你定义的变量"]就行了

string str = "";
str = session["你session的名字"].toatring();

....
下面把str存进数据库就可以了

Table tb = new Table();
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.Text = Session["sss"].ToString();
row.Cells.Add(cell);
tb.Rows.Add(row);
这样??