TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aleksandar Hristovski
NA
18
0
Reading integer values from a textbox in visual C# 2008
Jan 11 2009 5:38 PM
Hi,
I'm a newbie in visual C# and i need to read values from a textbox into an integer variable.
The user is not allowed to input other characters but numbers into the textbox.
int a1;
string ia1;
ia1 = txtMNA1.Text.ToString();
a1 = Convert.ToInt32(ia1);
This is what i wrote and it returns "Input string was not in a correct format." runtime error.
Thanks for your help,
Hristo
Reply
Answers (
1
)
Reading integer values from a textbox in visual C# 2008
Error:Make sure that maximum index on a list is less than the list size