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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:56:42+00:00 2026-05-16T14:56:42+00:00

this has me puzzled – I am no expert on page life cycle but

  • 0

this has me puzzled – I am no expert on page life cycle but I do not see why this is happening. It may be a simple case of where I declare my list. Here is the code:

public partial class feedback : System.Web.UI.Page
{
    List<Module> allModules = new List<Module>();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            allModules = getAllModules();

            // Populate dropdown list of modules
            populateModulesDropDown();
...

The logic is this: the List ‘allModules’ get populated with Objects of a class called ‘Module’ in the getAllMethods() method. I have debugged and stepped through it testing on each step. allModules has a count of 9 as it should but when i step to the next line to run the populateModulesDropDown() method – the count is zero.. What is going on??

Any help would be awesome – thanks

Frank

  • 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-16T14:56:43+00:00Added an answer on May 16, 2026 at 2:56 pm

    I was returning a different List object from getAllModules() due to an overlooked line when making changes earlier. Apologies and thanks

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

Sidebar

Related Questions

This topic has been scratched once or twice, but I am still puzzled. And
This has to be a frequent question, but not on SO yet, so it
This one has me puzzled. It seemed like an easy task, but the solution
This one has always puzzled me, but i'm guessing there is a very sensible
Really puzzled on this, probably simple but it is the day after New Years.
This has probably something to do with my transformations, but right now I can't
I'm a bit puzzled. CSS tricks has an area for comments, but I noticed
This question has puzzled me for a while. A public property that can be
Ok I am definitely puzzled, why this is not returning 6 in textarea. It
Something that has always puzzled me, and still does to this day, is why

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.