在会话中存储和检索网格数据 [英] Store and retrieve grid data in/from session

查看:75
本文介绍了在会话中存储和检索网格数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在page1上有一个网格,在grid的selectindex上,我将用户重定向到另一个page2.
现在,当我想从第2页返回第1页时,我想在第1页中显示用户相同的数据,他在重定向到第2页之前已经拥有该数据.
我该怎么做.
任何示例代码都是有帮助的.

i have one grid on page1, on selectindex of grid, i redirect user to another page2.
now when i want to comeback to page1 from page2, i want to display user same data in page1, which he has before redirect to page2.
How can i accomplish this.
Any sample code is helpful.

推荐答案

与您第一次在网格上显示数据的方式相同(可能是从数据库中获取数据).

就像您在问题主题中提到的那样,另一种方式是将其存储在Session object中,但要注意记录的数量不要太多.
The same way you have shown data on the grid first time (probably getting it from database).

The other way would be, as you mentioned in your question subject, to store it in a Session object but be careful that the number of records are not too much.


您需要维护说明您在页面之间进行往返的时间.
参见这里 [
You need to maintain state when you do a round trip between pages.
See here[^] for some options.

Otherwise, check on mdsn.


希望 ^ ]文章也可能使您有个主意.
Hope this[^] article might also hive you an idea.


这篇关于在会话中存储和检索网格数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆