Solved

Range Validation

Posted on 2007-11-28
2
425 Views
Last Modified: 2012-06-27
This is not an exam or Homework

You are creating a Web form that has a Textbox named txtAge. You have to make sure that end users enter a valid age between 13 and 99. Which of the following options should you choose?

1. use a RangeValidator, set the ControlToValidate property to txtAge, the Type attribute to Integer, and the ValidationExpression property to [13,99]
 
2. use a RangeValidator, set the ControlToValidate property to txtAge, the Type attribute to Integer, the UpperRange attribute to 99, and the LowerRange attribute to 13
 
3. use a RangeValidator, set the ControlToValidate property to txtAge, the Type attribute to Integer, and the ValidationExpression property to 12 < txtAge < 100
 
4. use a RangeValidator, set the ControlToValidate property to txtAge, the Type attribute to Integer, the MaximumValue attribute to 99, and the MinimumValue attribute to 13
 
0
Comment
Question by:cybernation989
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
bungHoc earned 500 total points
ID: 20367998
A quick look at this link will give you the correct answer.. Again.. do some reading please
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.rangevalidator.aspx

0
 

Author Comment

by:cybernation989
ID: 20371735
thanks bungHoc,

from what the site says

"The RangeValidator control uses four key properties to perform its validation. The ControlToValidate property contains the input control to validate. The MinimumValue and MaximumValue properties specify the minimum and maximum values of the valid range."

So the answer is 4
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question