在ASP.NET中刷新Application对象的数据 [英] Refreshing data of Application object in ASP.NET

查看:73
本文介绍了在ASP.NET中刷新Application对象的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Application对象在服务器端存储一些sproc信息。我需要在一天内更新一次Application对象的数据。



以上要求通过使用Cache对象完美地工作。但是我需要这个而不使用Cache对象。



是否可以使用Application对象或ASP中有任何方法。 NET?

I want to store some sproc info at the server side using Application object.And i need to update that Application object''s data once in a day.

Above requirement is working perfectly by using Cache object.But i need this without using Cache Object.

Is it possible with Application object or Is there any way in ASP.NET?

推荐答案

a)在应用程序启动时将日期时间存储在另一个应用程序变量中。

b)当您从应用程序对象中检索值时,首先检查 当前日期时间 - 存储在应用程序变量中的日期时间值的差异,如果它超过24小时,然后获得新的价值&更新应用变量值&还更新应用程序变量中的datetime值。
a) Store datetime in another application variable when application starts.
b) When you are retrieving value from application object first check difference of "current date time - date time value stored in application variable" if it is more than 24 hours then get new value & updation application variable value & also update datetime value in application variable.


这篇关于在ASP.NET中刷新Application对象的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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