?
Solved

Range Validation

Posted on 2007-11-28
2
Medium Priority
?
429 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 1500 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

649 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