473,396 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Input stirng was not in currect formate

please help me.
error is giving.



Expand|Select|Wrap|Line Numbers
  1. int ages = 0;
  2.           ages = int.Parse(textBox2.Text);
  3.  
  4.             if(textBox2.Text == "")
  5.             {
  6.                 MessageBox.Show("Age Blank  ......");
  7.  
  8.             }
  9.             else if (ages >= 5 || ages <= 9)
  10.             {
  11.                 MessageBox.Show("age must be 5 to 9 only");
  12.             }
Nov 18 '12 #1
1 1418
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

You haven't told us which line the error is on but I assume it's on line 2. That error means that what ever was typed into that textbox doesn't look like a number.
Nov 19 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
1
by: Gary Wessle | last post by:
Hi import string import re accumulator = pattern = '(\S*)\s*(\S*)\s*(\S*)' for each text file in dir openfile and read into text
2
by: ad | last post by:
I use a TextBox for to enter an string. How can I determiniate if the stirng is Chinese or English?
3
by: raahat | last post by:
hi, i need to do desperately the way of storing american DATE formate( like 27-02-2007) in mysql table.i searched on the web a lot,but didnt find anything.PLZ i need someone's help.
6
by: Steve Ryan | last post by:
can anyone send me to some good examples of edit in place for data frid columns i see dot net let me assign a control in the IDE any good sources of reading on editing columns with controls...
1
by: icemani | last post by:
Is there any advantages that storing data in hexadecimal octal formate in data base? By Manikandan.
14
by: Trevor2007 | last post by:
I would like to allow the user to enter an input mask for a field and have the appropriate error message display if the citeria isn't met.ie: input mask = 99AA99"A""B" the message box would then...
2
by: phpfreak2007 | last post by:
Hi everyone... I want to copy text from clipboard and paste into my project.I am able to do it but problem is Its not in same formate..That means I want bold letter as bold and with same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.