Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / November 2006

Tip: Looking for answers? Try searching our database.

advanced validation by code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sankalp - 30 Nov 2006 02:43 GMT
Hi I am writing a large program where I am using three text boxes. I am
performing validation controls on these text boxes however there are
some conditions

Names of textboxes
1.    x
2.    y
3.    z

The conditions are

1.    x , y , z should be numeric.
2.    x and y can be blank ( x = "" , y = "") at a time
3.    z can never be blank, it should always have a numeric value.
4.    if x has a value y cannot be blank and x should be non negative
5.    if y has a value x cannot be blank and y should not be non negative.
6.    if x and y have values y > x
7.             z should be non negative

A message box should pop up each time the user clicks a button with the
appropriate error ( eg : x cannot be negative , or y cannot be greater
than x , etc... )

Since I am actually dealing with cells in a data grid I cannot use any
sort of validation controls. I need to perform the validation using
code. I am using visual studio 2005 , Visual Basic
Any sort of help will be gratefully appreciated.
Mythran - 30 Nov 2006 18:49 GMT
> Hi I am writing a large program where I am using three text boxes. I am
> performing validation controls on these text boxes however there are
[quoted text clipped - 23 lines]
> code. I am using visual studio 2005 , Visual Basic
> Any sort of help will be gratefully appreciated.

Your logic is a little fuzzy/messed up.   Step #6: if x and y have values, y
> x.

In the paragraph immediately following, it says (eg : x cannot be negative,
or y CANNOT be GREATER than x)...hmm, little weird here ;)

Mythran

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.