会话对象已重新分配 [英] Session Object ReAssigned

查看:98
本文介绍了会话对象已重新分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个问题,会话对象被重新分配.我在这里详细说明,
我有一个带有Grid的页面,该数据将使用List进行绑定.其中的列表每行包含一个类的属性.像这样

Hi,

I have a issue for session object is reassigned. Here I explain detail,
I have a page with Grid which the data will bind using List. Which the list contains a property for a class each row. Like this,

Class Order
{
public string OrderNo{get;set;}
public string Quantity{get;set;}
}



列出< order>这里的列表对象有1000行.我已经将列表存储在会话变量中,该变量用于其他操作.对于网格绑定,我一次不能绑定1000行.基于页面大小,我将从订单清单对象获取清单.像这样



List<order> Here the list object having 1000 rows. I have stored the list in a session variable which is used some other manipulation. For Grid Binding, I can not bind 1000rows at a time. Based on page size i will get the list from order list object. Like this,

OrderList.Skip(start).Take(limit).ToList();



例如,它将返回15行以仅绑定网格.绑定数据后,我将获得总计列表(1000行)并基于会话变量操纵某些过程.但是会话变量对象仅具有15行.

如何更改会话对象?我无法将15行重新分配给会话对象.

请帮助我解决此问题



For example, it will return 15 rows to bind the grid only. After binding the data i will get total list (1000 rows) and manipulate some process based on session variable. But session variable object having 15 rows only.

How it is possible to change the session object? I could not reassigned 15 rows to session object.

Please help me solve this problem

推荐答案

As Espen Harlinn
told you can put another similar type list for only 15 items

or if you show your code than it will help us to help you..


使用两个会话变量-一个用于完整列表,另一个用于要分配给网格的15个项目.

问候
Espen Harlinn
Use two session variables - one for the complete list, and one for 15 items you want to assign to the grid.

Regards
Espen Harlinn


这篇关于会话对象已重新分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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