473,378 Members | 1,555 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,378 software developers and data experts.

Getting textbox input and validating it for numerical value

I have an assignment where I need the user to enter a number between 40 and 60 in a textbox. I have to check to make sure it was between 40 and 60 and if it isn't I have to alert them to that.

Can someone give me some guidance?
Jun 13 '07 #1
3 2254
RedSon
5,000 Expert 4TB
I have an assignment where I need the user to enter a number between 40 and 60 in a textbox. I have to check to make sure it was between 40 and 60 and if it isn't I have to alert them to that.

Can someone give me some guidance?
I can only give you general help because I don't know what language you are talking about. First you will need to get the text from the text box. This usually comes in the form of a string, so you will have to convert that string to a number. Look in the standard library for functions that do this for you. Then you will have to run a test to see if the number is between 40 and 60. If it is then you can continue. And if it is not you can alert them via a message window or some kind of alert.
Jun 13 '07 #2
debasisdas
8,127 Expert 4TB
I have an assignment where I need the user to enter a number between 40 and 60 in a textbox. I have to check to make sure it was between 40 and 60 and if it isn't I have to alert them to that.

Can someone give me some guidance?
can you kindle post what/how u have tried to solve this problem.
Jun 14 '07 #3
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that 'need help' actually makes people LESS likely to answer your question?).

The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

Then when you are ready post a new question in this thread.

MODERATOR
Jun 14 '07 #4

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

Similar topics

3
by: rodger | last post by:
How do i validate text box entry, in VB. net In the event that user does not make a text entry, simply pop-up a warning, thanks rodger
1
by: David Smith | last post by:
What I want to be able to do: A textbox is available that the user can enter information into. Specifically (for the purposes of this post), the user is asked to enter a number, and that number...
2
by: Colin McGuigan | last post by:
This is a translation of an ASP page to ASP.Net. First, the background: The goal is to have a grid of different settings for the application -- think something along the lines of the Property...
9
by: rodger | last post by:
Hi all, how do I set a Textbox to only accept numerical values in vb .net many thanks rodger
5
by: Reny | last post by:
can any one tell how can i restrict my user to type just numeric character in the textbox.I am using VS.NET 2003 (VB.NET)
14
by: teddysnips | last post by:
WINDOWS FORMS I've a form that has a textbox that allows the user to enter a string. On the LostFocus event, the textbox formats the string into a preferred format. However, if the user...
5
by: YardDancer | last post by:
Hi all I don't want to use the the Cint() or CDec() or other VB.Net Functions and I dont want to restrict keystrokes in the textbox. I am also using the "strict type semantic" settings that...
14
by: n3o | last post by:
Hello Comp.Lang.C Members, I have an issue with user input that I have been trying to figure out for the longest. For instance, let's say you have something like this: void foo() { int num;...
7
by: weg22 | last post by:
Hi all, I need to impose maximum and minimum numerical limits on a textbox. I'd prefer not to code these in (since I have many textboxes and the limits on each are different) and was wondering...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.