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 8026483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:30:21+00:00 2026-06-04T23:30:21+00:00

I am creating an asp.net page which loads data from a (SQL) visual studio

  • 0

I am creating an asp.net page which loads data from a (SQL) visual studio database file (.mdf).

The data is loaded into a list of User objects (List) which contain the user data obtained from the database. This data is then displayed in a ASP.net table with a check box in column one. This allows the person viewing the webpage to in theory select users via the check boxes.

I have an ASP.net button also on the same page which when clicked will cause a post-back and go through the table row’s and correctly identify which rows have and have not been checked. I am able to get the user data at this point as the Page_Load event is fired and the database contents are re-loaded for the second time.

Obviously this could become quite expensive obtaining the full list of users on each Page_Load so I have started investigating using the IsPostBack variable which allows me to identify whether it is a button click or standard page load.

The problem I have when using IsPostBack is the database contents loaded into the List on the initial Page_Load event would now be equal to null as the call into the database would never occur. This is understandable expected behavior and my question is what would be the best way to preserve the contents of the list so the button click can access the data loaded from the database on the initial Page_Load, without having to do another database query?

Thanks.

  • 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-04T23:30:22+00:00Added an answer on June 4, 2026 at 11:30 pm

    If its not user specific data that you are taking about store it in Cache.

    Asp.net Caching

    If its use specific data store it in session.

    Session

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an ASP.NET page where I need a couple of variables which
When creating a asp.net page, which uses the .NET framework, does the client accessing
I am working on a asp.net application in which i am creating a page
I have the following acceptance criteria for creating a pdf file from my asp.net
I'm creating a file-browser in ASP.Net but I have run into a problem which
I'm creating an asp.net page that uses the google map api. The page loads
I have a document that my asp.net page is creating and I need to
I am dynamically creating an asp.net RadioButton and inserting it into my web page:
I'm Creating an asp.net Web Site using C#. I have a page called Set
I am creating web page using asp.net. Is it possible to remove/hide the browsers

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.