473,396 Members | 1,998 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.

advanced validation by code

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.

Nov 30 '06 #1
1 1110


"Sankalp" <sa**********@gmail.comwrote in message
news:11********************@14g2000cws.googlegroup s.com...
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.
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
Nov 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
4
by: ianv2 | last post by:
Hi I have the following form that I need advanced validation on, I would appreciate any help please. How can I validate the form so that the user has to select an option from the select box...
4
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
4
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
1
by: FayeC | last post by:
I am trying to find some tutorials on advanced form validation. I have a form and I have basic validation (empty, value, etc) but I would like to validate some forms to stop people from using the...
2
by: FayeC | last post by:
Can anybody point me to a good tutorial/manual on advanced server-side form validation including validation of fields against unwanted strings such as the use of "http://". Thank you in advance,...
3
by: pr | last post by:
Is it possible to use an XML Schema to ensure that the data in one attribute is less than or equal to the value in another? Is it possible, through the use of the <xsd:sequenceor similar, to...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.