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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:44:23+00:00 2026-06-01T23:44:23+00:00

Basically I would like the user to input 3 values into a textbox and

  • 0

Basically I would like the user to input 3 values into a textbox and have a button that calculates the total of the 3 inputted values. I thought I could read the user input and then convert it into an integer and from that apply a formula to work out fnum+snum+tnum = total; What I have done so far does not work can anybody guide me thanks.

         int num1 = int.Parse(weighting1.Text);
         int num2 = int.Parse(weighting2.Text);
         int num3 = int.Parse(weighting3.Text);
         total = num1+num2+num3;
         int total = int.parse(lTotal.Text);
         // Code to display the variable
  • 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-01T23:44:25+00:00Added an answer on June 1, 2026 at 11:44 pm

    instead of int.parse(lTotal.Text) you need to assign total’s string value to label

    lTotal.Text = total.ToSTring();
    

    Your code should be:

     int num1 = int.Parse(weighting1.Text);
     int num2 = int.Parse(weighting2.Text);
     int num3 = int.Parse(weighting3.Text);
     int total = num1+num2+num3;
     lTotal.Text = total.ToSTring();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to add a preprocessor to HTML pages. Basically, I have a
I would like to have fuzzy looking border around my Canvas control. Basically, I
Basically i have a classic vhost with: ServerName www.site.com ServerAlias site.com I would like
My application will basically accept user input via the main(String[] args) method. I have
Basically, I have a user input field where a user can enter a number.
I have a bit of HTML code that I would like to change based
The code basically allows the user to input the name of the file that
I have this Jquery line which finds the cell I would like to input
I'm working on a plugin system. Some plugins need user input. I would like
I'm attempting to check the values entered by a user into an input text

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.