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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:02:00+00:00 2026-06-03T10:02:00+00:00

I created a dynamic UI that shows each module that the user has added

  • 0

I created a dynamic UI that shows each module that the user has added to their selection and all the assessments for that module underneath the module name,
All data is saved in array lists – including objects as textBoxes and labels.

Here’s what it looks like:
http://www.4shared.com/photo/fullsize/Ja3jHpRJ/screen1.html

Then the user should enter their marks for each assessments
And the Calculate button should calculate their overall mark for each module
At this stage I am just adding the marks together.
The program works fine when there’s only one module added, but when there are more modules it seems to think that a TextBox is empty, even though i fill them all with numbers.

here is my code

private void calculateButton_Click(object sender, EventArgs e)

    {
        int modLength = dat.ModuleTitle.Count;
        int modAsses = 0;
        int loopCount = 0;

        for (int i = 0; i < modLength; i++)
        {

            int total = 0;

            if ((textboxComputer[loopCount] as TextBox).Text == "")
            {
                Console.WriteLine("!!!!!");
            }
            else
            {
                modAsses = int.Parse(dat.ModuleAssessNum[i].ToString());
                for (int y = 0; y < modAsses; y++)
                {

                    total = total + int.Parse((textboxComputer[loopCount] as TextBox).Text.ToString());

                    loopCount = loopCount + 1;
                }

                Console.WriteLine(total);
            }
        }
    }  

When i add two or more modules it displays the “!!!!!” message, but calculates the mark for the first module added.

here’s some output
http://www.4shared.com/photo/fullsize/PlY29BMQ/screen2.html

  • 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-03T10:02:02+00:00Added an answer on June 3, 2026 at 10:02 am

    You need to make sure that the code that creates the extra dynamic elements on screen is being called as part of the page load, so that then the viewstate is inserted back into the elements and can be read back out by your code.

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

Sidebar

Related Questions

I need to implement a dynamic div that pops up for each user. I
I have a dynamic Datagrid that I have created. I am creating each column
I have created a dynamic list picker script using Jquery 1.3 and PHP that
I'm attempting to build some dynamic menus that are created on the fly by
I have a reporting module in an ASP.NET webforms app (C#) that uses dynamic
We have a GUI of several frames that build their contents dynamically. Each frame
I have a ListView that is filled with a dynamic set of data each
I've created an external file that's handling the dynamic helpers, which includes a bunch
I am trying to create a dynamic hyperlink that depends on a value passed
What I am trying to accomplish: Create a dynamic bubble that expands on height

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.