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

WEB form range validation

How would I write a code that would check to ensure the number in the text-box is between 1 - 12.

I have set up the range control validator in the properties to control the txtNumberCarts. The (min) is set to 1 and (max)
set to 12. Type is set to integer.

I want to ensure that textbox is not left blank. How do I add the required field validator to same textbox? where do I place in form?
Mar 18 '12 #1
1 1744
Frinavale
9,735 Expert Mod 8TB
Add a required field validator to the page just like you added the range validator.

Please remember to also do server-side validation.

-Frinny
Mar 19 '12 #2

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

Similar topics

1
by: Martin Nadoll | last post by:
Hello, i have a few problems with form field validation: First i have to check, wether a field is filled with 10 integer numbers. Also allowed is " " and "-" but no letters, and the input of ...
2
by: Kostas | last post by:
Just a quick question on this issue. Assume a small set of fixed values for a field. For instance Field Gender, values: Male, Female, Unknown If I create a Combo Box with the above values, I...
1
by: tshad | last post by:
Can you do Range Validation inside of an EditItemTemplate of the DataGrid? I have one set up as: ****************************************** <td> <asp:TextBox Columns="3" id="Weight"...
1
by: AECL_DEV | last post by:
Hello Everyone, Ive seen alot of people saying that the best way to AJAX Validate a form is through the submit button, because validation should be synchronous. Im wondering, is there any good...
0
by: Matt | last post by:
I have a simple datagrid that shows configuration properties as Name : Value pairs. I want to be able to programmatically change the validation controls that apply based on the name field of the...
1
by: Brendan Reynolds | last post by:
In an ASP.NET 1.1 app I have the following range validation control. This is an intranet app that will be used only within Ireland, so all date input is expected to be in dd/mm/yyyy format. ...
8
by: Theadmin77 | last post by:
Ok ,i have to create a page to allow entry of user information;all fields must be validated and error displayed otherwise * First Name (limit 25 characters) * Last Name (limit 25...
2
by: parsa28 | last post by:
Hi there, could someone help me with a form field validation that puts one of two images (one a "tick" saying the field is correct and a "red dot" saying the field is not validated) ? I know how to...
3
by: parsa28 | last post by:
Hi there, could someone help me with a form field validation that puts one of two images (one a "tick" saying the field is correct and a "red dot" saying the field is not validated) ? I know how to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.