且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用会话将数据一页一页地传输到另一页

更新时间:2022-12-03 19:26:52

请从MSDN阅读Session的基础知识.请检查以下链接,这将对您有所帮助.

http://msdn.microsoft.com/en-us/library/ms178581.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/ms972429.aspx [ ^ ]
Please read the basic of Session from MSDN. Please check the below links this will help you.

http://msdn.microsoft.com/en-us/library/ms178581.aspx[^]

http://msdn.microsoft.com/en-us/library/ms972429.aspx[^]


首先,这个问题不清楚.向可以更好地处理英语的人寻求帮助会更好.

然后,如果您只希望传递 cuser_id 并且仅在目标页面中希望此值,则***使用 ^ ].

First of all, this question is not clear. It will be better to get help from someone who can handle English in a better way.

Then, If you want to pass only cuser_id and you want the value of this only in the destination page, better use Query-String[^].

obj5.Account_id = Session["aaa"].ToString();
obj5.Account_id = TextBox1.Text;



在上面的代码中,删除第二行,因为它覆盖了 obj5.Account_id .

问候
塞巴斯蒂安



In the above code, remove the second line as it overwrites the obj5.Account_id.

Regards
Sebastian


在您的第一页中

In your 1st page

string qid = "121";
Session["QueryString"] = qid;




要在第二页中接收数据,请使用
perWorkId = Convert.ToString(Session ["QueryString"]);




To receive the data in the 2nd page use
perWorkId = Convert.ToString(Session["QueryString"]);