Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8363089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:05:45+00:00 2026-06-09T12:05:45+00:00

I have a about 10 application variable counters in Global.asax for displaying the file

  • 0

I have a about 10 application variable counters in Global.asax for displaying the file downloads of these different 10 categories. Now I want to insert/Update values of these counters on a specific time (due to reset of counter when application restart get reset the counter) say at 11PM each day and update the counter.

How to do? Any ideas?

In Global.asax:

void Application_Start(object sender, EventArgs e)  
{ 
        Application.Add("MGM",0); 
        Application.Add("PC",0); 
        Application.Add("NC",0); 
        Application.Add("TC",0); 
        Application.Add("PGC",0); 
} 

The shortCode parameter is the name of global session from Global.asax file. That I am passing to get the counter and increment accordingly.

In Download.aspx.cs page:

private int GetCount(string shordCode) 
{ 
    int count=0; 
    count = Convert.ToInt32(Application[shortCode]); 

    lock (Application[shortCode]) 
    { 
        Application[shortCode] = ++count; 
    } 

    return count; 
} 

Help appreciated..!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:05:46+00:00Added an answer on June 9, 2026 at 12:05 pm

    You Can use below code.

    public void GetCurrentTime()
        {
            int hours ;
            hours = DateTime.Now.TimeOfDay.Hours;
            //when time is 23Hrs of the day
            if (hours == 23)
            {
    //       UpdateCounter here           
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have about 10 Session variable for storing the File Download Counts of each
I have read about application object in android site but I couldn't understand. What
I have about 2000 lines of javascript code for my application. A lot of
Currently in my iPhone application I have about 200 image views, and I will
I have a combobox in a view that receives information about application state changes,
I'm currently writing a web application that have about 6-12 pages. On each one
In an application I will have between about 3000 and 30000 strings. After creation
I wrote an application about NFC in android,but I have a problem. When I
I have a server-client application [TCP sockets, .NET 4.0].. the application about : do
We are still in .NET 1.1 I have a small application about 15 pages.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.