Solved

Range Validation

Posted on 2007-11-28
2
426 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

687 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