自定义控件帮助.可查询 [英] Custom Control help. IQueryable

查看:60
本文介绍了自定义控件帮助.可查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有Web用户控件的页面.该控件具有一个IQueryable对象,该对象需要由页面使用.我尝试使用会话保存Iqueryable对象.然后,从页面中,我可以调用

myCustomWebUserControl.Session ["IQuery"]

,这可行,但是我不想使用Sessions.我尝试了ViewState,但是它无法保存IQueryable对象.

由于回发而必须保存它,但是如果有人导航到另一页,则应该删除数据.

我正在列出然后,这些IQueryable对象将它们组合在一起以构成一个较大的搜索字符串.我必须使用Iqueryable,因为出于明显的原因,我不想枚举列表.

如何通过这种方式传递查询?

请先谢谢.

I have a page with a Web User Control that I made.  The control has an IQueryable object that needs to be used by the page.  I tried saving the Iqueryable object using Sessions.  Then from the page I can call

myCustomWebUserControl.Session["IQuery"]

This works but I dont want to use Sessions.  I tried ViewState but it cant save IQueryable objects.

It has to be saved because of postbacks but if someone navigates to another page, the data should be erased.

I am making a list of these IQueryable objects then combine them to make a large search string.  I have to use Iqueryable because I don't want to enumerate the lists for obvious reasons.

How can I pass the query this way?

Thanks in advance.

推荐答案

感谢您的发帖!我建议您在一个MS论坛中发布您的问题,

Thank you for your post!  I would suggest posting your question in one of the MS forums,

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