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

  • SEARCH
  • Home
  • 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 3992038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:43:06+00:00 2026-05-20T06:43:06+00:00

In my code I have a dropdown selection and upon selection from dropdown the

  • 0

In my code I have a dropdown selection and upon selection from dropdown the code performs further processing and generates report/data.

Further, the entire program depends on data which is gathered from 3 different operation

Operation1: processing a text files of size of size > 6MB

Operation2: SQL Query to a DB (Query takes around 1 minute)

Operation 3: HTTP POST request to server (The main costliest part of the programe)

So, to make it efficient I am thinking to perform this operation only once and use the data for all the different selection from dropdown.

Question is how can I do so as below:

  1. I can’t put it in “page_load” event because every time page loads the operations will carry out

  2. I can’t put it inside “dropdownlist_selectedindexchanged” event because then it will be same as #1.

  3. I thought of doing it in “page_load” as below


void Page_Load(object sender, EventArgs e)
{
    if(!ispostback)
    {
        Operation1();
        Operation2();
        Operation3();
    }
}

This is fine; the operations gets performed only once and I can use the data throughout, but then my page will take time to load as the operations takes time.

Is there any other way I can achieve what I want? Please let me know.

Thanks,
Rahul

  • 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-05-20T06:43:07+00:00Added an answer on May 20, 2026 at 6:43 am

    If the data set will not change, you probably could manage to do it once at Application_Start().

    Edit – something like this (typing from memory and away from VS, i do VB):

    Protected void page_load(object sender, eventargs e)
    {
        // the name can be anything
        if (!System.Web.HttpContext.Current.Session["data_cache_filled"])
        {
            // code to fill the cache.
            // ...
    
            //mark it as filled
            System.Web.HttpContext.Current.Session["data_cache_filled"] = "yes";
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this PHP code that I use to make a dropdown form selection
I have a populated dropdown list from mysql on one page. What code should
I have a dropdown list with a piece of code that is run when
I have 3 dropdown selection input and one textarea input. I think it's invalid
I have two different dropdown boxes with prefilled selection items. I am trying to
I recently managed to get dropdown selection to work by dynamically ouputing some data
I recently managed to get dropdown selection to work by dynamically ouputing some data
I'm running in a little issue here regarding jsf related dropdown selection. I have
I have a simple form that has a list (dropdown list generated from a
i have 2 dropdown lists, 1 label & 1 textbox. on selection of 'product

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.