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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:04:13+00:00 2026-06-03T15:04:13+00:00

Whilst trying to convert the number from the value of a numericupdown to an

  • 0

Whilst trying to convert the number from the value of a numericupdown to an int32 it is giving me the wrong number, ive stepped through and debugged it and it even shows as the numeric up down having a value of 3, yet the int it is being stored in is coming out as a 2. i really dont know why its doing this

int max = Convert.ToInt32(Sale.numericUpDown3.Value);

when debugging Value shows as 3, but max shows as 2, this means that later on when max is being used its retrieving data from the wrong row in my datatable. this happened to anyone before? :S

  • 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-03T15:04:16+00:00Added an answer on June 3, 2026 at 3:04 pm

    SOLVED: Ok so i figured this one out stepping through my code numerous more times, turns out what was happening was the moment the other form was created max became the value of when the form Started, not the value in it when the form was submitted, because the form when opened was usually 1 behind what it would be when submitted my max would be wrong, but that doesnt explain why 3 being converted came out as a 2, and here is the reason, the timing of my step through, the form started, max took on the value (2) then i changed the value of the numeric up down to 3, and looked THEN looked at my code, max was set at 2 as it understood it should have been but the numericupdown value showed me the CURRENT value of the numeric up down, not the value of it when it was used to give its value to max, hence i never saw the problem and wondered how the hell it did it, a bit of headscratching but a simple solution! thankyou to till who pointed out it could have been a timing issue, solved my problem!

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

Sidebar

Related Questions

Whilst trying to update through the Android AVD Manager, I receive the message: No
I am getting this error whilst trying to send emails through gmail - Net::SMTPAuthenticationError
I'm trying to walk through Hartl's Ruby on Rails tutorial whilst upgrading his examples
Whilst using Xcode 4.0 and trying to debug and see what value is held
Whilst digging through the STL sources (DinkumWare, SGI, STLport, etc..) and trying to make
I'm getting an error whilst trying to install psycopg2 on ubuntu 9.10 64 bit.
Gday All, I have a baffling problem whilst trying to insert some chinese characters
I am trying to read an XSLT file from disk in my ASP.Net MVC
I'm getting an error whilst trying to add an event listener to a class
Coming from OO (C#, Java, Scala) I value very highly the principles of both

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.