Click here to Skip to main content
13,596,975 members
Rate this:
Please Sign up or sign in to vote.
See more:
Create a program to check if we have a valid IP Address (a valid IP address is composed of 4 numbers, each is between 0 and 255). Create four textboxes (where you enter each of the numbers) and a button. When you click on the button, it will tell you whether we have a valid IP or not (also, give message when user doesn't enter a number in a textbox)
Posted 31-Jan-13 8:15am
Updated 31-Jan-13 8:38am
DinoRondelly 31-Jan-13 14:17pm
Sounds easy enough where are you stuck?
Iman90 31-Jan-13 14:46pm
the code for the button?!
DinoRondelly 31-Jan-13 14:48pm
Which part?
Iman90 31-Jan-13 14:51pm
when the user clicks on the button, it will inform them that their IP address either its valid or not?
Abhishek Pant 31-Jan-13 14:56pm
suggestion: use validation code you got from earlier question[^] and generate a alert when it remains blank on click event of button.
Iman90 31-Jan-13 14:58pm
I tried the suggestion, it doesn't work. I'm sure there must a simpler way .. obviously thats why i asked the question again!
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1) DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
2) "HELP! HELP HELP!! neeeeeeeeeeeed help!!" is not a good subject - it tells us nothing about your problem (except your lack of maturity).
3) Don't post the same question under different guises - we cna read and remember and notcie these things.
4) We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
Iman90 31-Jan-13 15:07pm
I'm Sorry, I do believe i made a mistake!
but please i do need help, i do not know the code for the button from the previous question>?
Iman90 31-Jan-13 15:10pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

In this thread they go over validating an ip address,[^]

No sure what you will need from there, when the user press your button call the function you create to validate and have that function return true or false and display the message you want the user to see.
Iman90 31-Jan-13 15:08pm
Thank You! ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.180621.3 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100