Questions tagged [application-state]

Use this tag for questions related to the Application State; an application can be at the active state, for example.

96 questions
1
vote
2 answers

How to add a System.Xml.XmlDocument type to applications state

I am using Asp.net 3.5 and C# I have to add an XmlDocument to my application state so that everytime my application doesnt access the XML file on my filesystem, I will add this at the Application_Start() function in Global.asax.cs I am adding this…
Umair Jabbar
  • 3,450
  • 5
  • 26
  • 40
1
vote
1 answer

Is there any scenario that can cause ViewDidLoad to be called before didBecomeActive?

I know it's sounds silly but just to clear a point. Is there any chance that view did load will be called before didBecomeActive ? Is it totally impossible ? EDIT We have a crash that happens when user is coming back to the app from the background…
shannoga
  • 19,000
  • 20
  • 99
  • 163
1
vote
3 answers

Effect of storing data using SharedPreferences in onpause android

I am storing my data structure values in SharedPreferences in onPause() methode of activity The SP.xml file size becomes 25K , will there be any effect of doing this storing in onPause() method if yes then What should I do to Store may…
Tushar
  • 1,102
  • 1
  • 12
  • 26
1
vote
1 answer

Saving contents of ApplicationState in ASP.Net (MVC)

I have an internal app used to edit XML files on disk. The XML files are loaded into an object model which is stored in ApplicationState. I need to save this data. The one option is to do this every time the user changes some data. However, this…
Saqib
  • 6,850
  • 7
  • 31
  • 51
1
vote
0 answers

Is it a good practice to use an Singleton to Application State object in MVC 4?

Recently I have been busy writing an MVC 4 Website and I need to hold some values across all the sessions so I deciede to use the "Application State" object. Because the MvcApplication class which rests inside the Global.asax.cs is of type…
Rojan Gh.
  • 707
  • 1
  • 6
  • 25
1
vote
0 answers

How can I get the current state of another android application as a bitmap?

Is it possible on android to get a Bitmap object (regular size, not a thumbnail) which represents the current state of another application running in the background, or a Bitmap object which represents the current state of an activity in the…
1
vote
1 answer

ASP.net beginner really confused about StaticObjects and how to declare it

I'm a beginner in ASP.net, i did some research about Application state. I know about declaring new application state inside the Application_start event. But when i looked inside MSDN library (which is not helpful at all unfortunately). I found this…
Rafael Adel
  • 7,282
  • 20
  • 72
  • 114
1
vote
1 answer

The application variable in ASP.net(c#).

I have a problem with the application state in Asp.net. I need a list of Strings that i would use in different forms in the same application. Here I add the list: Application.Add("users", new List()); In a new form I try to add a string…
Borut Flis
  • 12,872
  • 26
  • 74
  • 102
1
vote
1 answer

how to access application.get from generic handler

I have a global.asax in which I define some variables that I want to be available throughout the application, such as a class to handle certain database requests. In an aspx page, I can access these variables/objects using for example in Visual…
Fritz45
  • 547
  • 1
  • 6
  • 18
0
votes
1 answer

storing and updating a 2d array in application state in Asp.Net MVC 3

I plan to create a simple browser game based on ajax requests. I have a map that consists of 10x10 divs on the client. On the server I have an array[10,10] that represents the state of my divs, so for example if the client clicks on the certain div,…
Alan Budzinski
  • 791
  • 3
  • 14
  • 33
0
votes
3 answers

Refreshing iOS application or checking for connection in advance

I'm having some issues determining what the proper application design pattern is for initially alerting users that they need to enable an internet connection. I have an iOS app that requires an internet connection due to the wide range of data that…
Project707
  • 482
  • 6
  • 13
0
votes
2 answers

Store Dictionary object in ApplicationState Vs putting it in Web.config

I need to store a Dictionary in my asp .net application. This dictionary is basically a straight mapping of keys (strings) to values (strings). During the life of the Application the dictionary will not change and will contain about 10 elements. I…
Icarus
  • 60,193
  • 14
  • 91
  • 110
0
votes
3 answers

Storing classes in Application State (ASP.NET)

Let's say I wish to store an instance of the following in Application State, to be accessed very often. public class Example { public string A; public string B; public bool C; public int D; // ... } I can't decide whether to store the…
James
  • 6,911
  • 9
  • 40
  • 80
0
votes
1 answer

How to get the performance metrics of a Java application

How to get current memory in use, no. of threads, CPU usage, load metrics etc. of a Java application that runs on Tomcat or Jetty. I need these metrics for finding the current state of the application if it's overloaded or underutilized etc. and I…
JSC
  • 9
  • 3
0
votes
1 answer

Application variables get lost after post-back

My ASP.Net application has a Server Control developed by us which needs to store some keys in the Application level (i.e. across users and sessions) for future use. However, I found that the count neither of Page.Application and…
William Choi
  • 5,471
  • 6
  • 29
  • 48