《Microsoft MSNET Framework 20-Web-based Client Development VB and C 70-528题库》.pdf
文本预览下载声明
Microsoft 70-528
70-528 MS.NET Framework 2.0-Web-based Client
Development
Practice Test
Version 2.16
买题库 QQ:860424807
Microsoft 70-528: Practice Exam
QUESTION NO: 1
You create a Web Form that contains a text box named txtDate. You want the text box to allow
users to enter any valid date. You need to use an ASP.NET validation control to ensure that only
valid date values are submitted to the server. What should you do?
A. Add a CustomValidator control to the Web Form. Set its ControlToValidate property to txtDate.
Write a function in the partial class that verifies the values as dates and returns a Boolean
variable. Set the CustomValidators ClientValidationFunction to the name of your function.
B. Add a CompareValidator control to the Web Form. Set its ControlToValidate property to txtDate.
Set its Type property to Date. Set its Operator property to DataTypeCheck.
C. Add a RangeValidator control to the Web Form. Set its ControlToValidate property to txtDate.
Set its Type property to Date. Set its MinimumValue property to 01/01/1900 and its
MaximumValue to the current date.
D. Add a RegularExpressionValidator control to the Web Form. Set its ControlToValidate property
to txtDate. Set the ValidationExpression property to ensure that the users input follows the format
of nn-nn-nnnn, where n represents a number from 0 through 9.
Answer: B
Explanation:
The best way to verify the user entered a valid date is to use a CompareValidator to perform a
data type check.
B,C,D The other validation controls could be used for the check but do not represent the most
efficient and intuitive method.
QUESTION NO: 2
You create a Web Form. The Web Form allows users to recover their passwords. You add a
PasswordRecovery server control by using the following code segment.asp:PasswordRecovery
runat=server/You
显示全部