asp.net c#将DataTable从一个页面传递到另一个页面而不使用Session [英] asp.net c# passing DataTable from one page to another without Session

查看:65
本文介绍了asp.net c#将DataTable从一个页面传递到另一个页面而不使用Session的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用第三方工具,我想通过Session将DataTable从一个页面传输到另一个页面,但第三个工具清除所有会话和cookie。



如果有任何方式转移DataTable而不存储在Session中。

I am using third party tool in my application and i want to transfer the DataTable from one Page to another through Session but the third tool clear all the session and cookies.

if there is any way to transfer the DataTable without storing in Session.

推荐答案

你可以使用静态变量,但它不是一个好方法..或自定义第三方控制不清除cookie和会话或亲切粘贴代码
you can use static variable but its not a good approach..or customize the third party control not to clear cookies and session or kindly paste the code


我建​​议你将 DataTable 记录存储在一个文件中或者在数据库中的表中。然后在其他页面中再次检索数据并重复使用。
I would advise you to store the DataTable records in a file or in a Table in Database. Then retrieve the data again in other page and reuse it.


你可以在缓存中存储数据表

看看这个

http://stackoverflow.com/questions/6831665/how- to-store-datatable-in-cache-to-reuse-it [ ^ ]
you can store datatable in cache
have a look at this
http://stackoverflow.com/questions/6831665/how-to-store-datatable-in-cache-to-reuse-it[^]


这篇关于asp.net c#将DataTable从一个页面传递到另一个页面而不使用Session的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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