Validation Control and Web page navigation - ASP.NET (MCQ) questions and answers

Here, you can read Validation Control and Web page navigation multiple choice questions and answers with explanation.

1)   If you want to validate the email addresses, Social Security numbers, phone numbers, and dates types of data, which validation control will be used?
- Published on 28 Jul 15

a. RegularExpressionValidator
b. CompareValidator
c. RequiredFieldValidator
d. None of the above
Answer  Explanation 

ANSWER: RegularExpressionValidator

Explanation:
No explanation is available for this question!


2)   ASP.NET Validation Control works at ________ .
- Published on 28 Jul 15

a. Client side only.
b. Server side only.
c. Both Client Side and Server Side
d. None of the above.
Answer  Explanation 

ANSWER: Both Client Side and Server Side

Explanation:
No explanation is available for this question!


3)   You are developing a Web page that contains many validated controls. You want to provide a detailed message for each validation error, but the page doesn’t have sufficient space to provide the detailed message next to each control. What can you do to indicate an error at the control and list the detailed error messages at the top of the Web page?
- Published on 27 Jul 15

a.
- Set the Text property of the validator control to the detailed message.
- Set the ErrorMessage property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.
b.
- Set the ErrorMessage property of the validator control to the detailed message.
- Set the Text property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.
c.
- Set the ToolTip property of the validator control to the detailed message.
- Set the ErrorMessage property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.
d. None of the above
Answer  Explanation 

ANSWER:
- Set the ErrorMessage property of the validator control to the detailed message.
- Set the Text property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.

Explanation:
No explanation is available for this question!


4)   Match the following List 1 to List 2

a. Client-side navigation ---------------------- i. Server.Transfer
b. Cross-page posting ------------------------- ii. Response.Redirect
c. Client-side browser redirects ------------- iii. PostBackUrl
d. Server-side transfer ------------------------- iv. HyperLink

- Published on 27 Jul 15

a. a-iv, b-iii, c-ii, d-i
b. a-ii, b-iv, c-i, d-iii
c. a-ii, b-i, c-iii, d-iv
d. a-ii, b-iv, c-iii, d-i
Answer  Explanation 

ANSWER: a-iv, b-iii, c-ii, d-i

Explanation:
No explanation is available for this question!


5)   CompareValidator control can be used for performing which task?
- Published on 27 Jul 15

a. To perform a data type check.
b. To compare the value entered into a form field against a fixed value.
c. To compare the value of one form field against another.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


6)   Which validation control in ASP.NET can be used to determine if the data is entered into a TextBox control is of type Currency?
- Published on 27 Jul 15

a. ValidationSummary
b. CompareValidator
c. RequiredFieldValidator
d. None of the above.
Answer  Explanation 

ANSWER: CompareValidator

Explanation:
No explanation is available for this question!


7)   Which is the mandatory property for all validation controls?
- Published on 24 Jul 15

a. ControlToValidate
b. Message
c. EnableClientScript
d. EnableServerScript
Answer  Explanation 

ANSWER: ControlToValidate

Explanation:
No explanation is available for this question!


8)   There is a button on page name cancel and it should bypass validation when cancel button is clicked. What will you do?
- Published on 24 Jul 15

a. set CausesValidation = false
b. set RemoveValidation=true
c. set cancel=true
d. None of the above
Answer  Explanation 

ANSWER: set CausesValidation = false

Explanation:
No explanation is available for this question!


9)   Client-side validation is turned on by default. If you want that particular validation control should not validate at client side, what will you do?
- Published on 24 Jul 15

a. Set the EnableClientScript property to false
b. Set the validate property to false
c. Set the EnableClientScript property to true
d. Set the Page.Isvalid property to false
Answer  Explanation 

ANSWER: Set the EnableClientScript property to false

Explanation:
No explanation is available for this question!


10)   _____________is a property common in every validation control.
- Published on 16 Jun 15

a. ValidationExpression
b. InitialValue
c. ValueToCompare
d. ControlToCompare
e. ControlToValidate
Answer  Explanation 

ANSWER: ControlToValidate

Explanation:
No explanation is available for this question!


1 2