Solved

Range Validation

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now