I want to store a variable value that store its value life time.

I know the following things that can be used but it may have a storing limits.

  1. Session
  2. Cookie
  3. Query string

But I want to store value for lifetime.

I heard about "application variables", but I don't know about their functionality. So, could anyone tell me about it and also suggest me is there any other way to store values?

有帮助吗?

解决方案

Application is a key value dictionary of objects. Application state is stored in memory on the server and will be lost when application shutdown or crash. See this for more info.

If you want to store a value lifetime, I mean even when the Application crash or shutdown, you must use a database(it could be a xml file or structured file...).

其他提示

If it is regarding to the installtion of window applcation then you can add an entry in windows registry after finishing installation or at the time of running the application first time.

On the second installation you have to check that registry key.

Please refer Registory Handling

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top