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

Validation Server Controls used with multiple HtmlInputButton Controls


Hello,

I have an ASP.NET HTML form control with multiple
HTML input button controls each of which has an
associated HTML input control. For each HTML
input control I have a validator that checks
that the input value is greater than zero.
But I want zero to be displayed within the
text field and want the validator to run
only when the corresponding button is
pressed.

Basically my form looks like this:

Quantity A: [ 0 ]
[Submit Button A]

Quantity B: [ 0 ]
[Submit Button B]

Quantity C: [ 0 ]
[Submit Button C]

Quantity D: [ 0 ]
[Submit Button D]

Each quantity is OK when set to zero, but whenever
Submit Button X is pressed I want my ASP Validator
control to check that Quantity X is greater than
zero.

My problem right now is that asp:RangeValidator
does not seem to provide a way to specify that
the validator is run only when a very particular
button within the form is pressed (as opposed to
whenever any button within the form is pressed).

Could anyone please suggest a solution to this
problem (besides processing POST variables
directly within code and hard coding the
validation in a separate function). Is
there a better way? What is the best
way to tackle this particular problem
in ASP.NET. Yes, I could leave the
input text blank, but that would
violate one of the requirements
of the problem: I want control X
to allow the value zero in the
text box unless the user submits.
Thank you for your replies,

Best Regards,

Neil

Nov 16 '05 #1
0 1099

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

Similar topics

4
by: earwicker | last post by:
I recently deployed a web application which contains a user registration form with the usual fields: name, address, email, password, etc. Each of the TextBoxes uses a validation control to verify...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
7
by: Al Smith | last post by:
Newbee to aspx needs direction. We are using an <INPUT type="file" tag to upload a file. We also have a text field for the user to enter a description for the file which the user must enter. ...
5
by: Gary Vidal | last post by:
I have a client side Javascript which checks an OrderQuantityField against a hidden Textbox of the Minimum Order Quantity. I dont want to do validation on a postback. I would like to be able to...
3
by: Jonas | last post by:
Hi! I have aspx-page where I use multiple panels to make room for more controls than would otherwise fit onto one page. On submit, the controls on all panels, visible or not, should be validated...
1
by: Liz | last post by:
I have a page with several dropdownlists, several text boxes and several buttons which perform calculations. I need to validate one dropdownlist (not the whole page) with the click of one button. I...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
2
by: tshad | last post by:
I have a page that has no Validation objects, but I also have the following code: if not Page.IsValid exit sub end if For some reason, the page is hitting the "exit sub" statement? How...
12
by: Dabbler | last post by:
I need to insure that at least one of three phone number fields has a value (requiredfield) but I'm not sure of a way to implement this without server side logic. Is there a way to use the...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.