且构网

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

使用会话将数据从一页发送到另一页

更新时间:2022-12-03 21:01:12

您愿意学习吗?如果是,则此处 [
Are you willing to learn? if So here [^] is all you need to know about sessions in order to do your job.


还有其他方法可以将数据从一页转移到另一页.根据跨页面共享网格数据的方案,可以使用会话.

如果您有跨页回发 [
There can be other ways to transfer data from one page to other. Based on your scenario of having Grid data shared across pages, Session can be used.

If you have a Cross Page postback [^], then you can use PreviousPage property and get the data of the previous page.

You can also pass on the selected rows unique id''s in your URL as query string and then use them to get appropriate data. Pick the one that suits your website.


您可以将数据像
那样进行处理
you can put your data to sesssion like

Session["Data"] == /* put your datarow instance here */



并在其他页面上检索.



and retrieve same on the othe page.

if(session["Data"] != null)
{
DataRow _rowInstance = (DataRow)Session["Data"];
}



如果要浏览会话,请使用此 KB文章



and if you want to explore session use this KB Article

Thanks,
Hiren Solanki
{Mark as A Answer if it helps }