Results 1 to 3 of 3

Thread: Unconsistence NumericUpDown Control [Resolved]

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Location
    Klang, Selangor, Malaysia
    Posts
    163

    Question Unconsistence NumericUpDown Control [Resolved]

    I use a NumericUpDown control to let user set the "birth date year" value.
    the max value of NumericUpDownYear is 2002, while min value is 1880
    whenever the value of this control changed, the txtAge textbox will generate the age value:
    txtAge.Text = System.DateTime.Today.Year - NumericUpDownYear.Text
    but it seems to be not consistant at all. because the age that being generated is not correct n different all the time.
    what do i need to do now to make it consistence all the time?
    Please help. 10q!
    Last edited by albertlse; Aug 21st, 2003 at 08:37 PM.

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    use NumericUpDownYear.Value instead of NumericUpDownYear.Text. See if it helps.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Location
    Klang, Selangor, Malaysia
    Posts
    163

    Smile

    Thanks for your guidance, NumericUpDownYear.Value works exactly now!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width