Solved

Range Validation

Posted on 2007-11-28
2
424 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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

792 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