MCQs > IT & Programming > ASP.NET > You are creating an ASP.NET page for your company's Web site. Customers will use the ASP.NET page to enter payment information. You add a DropDownList control named oPaymentTypeList that enables customers to select a type of credit card and bank accounts. You need to ensure that customers select a credit card type. You want a default value of Select to be displayed in the oPaymentTypeList control. You want the page validation to fail if a customer does not select a payment type from the list. What should you do?

ASP.NET MCQs

You are creating an ASP.NET page for your company"s Web site. Customers will use the ASP.NET page to enter payment information. You add a DropDownList control named oPaymentTypeList that enables customers to select a type of credit card and bank accounts. You need to ensure that customers select a credit card type. You want a default value of Select to be displayed in the oPaymentTypeList control. You want the page validation to fail if a customer does not select a payment type from the list. What should you do?

Answer

Correct Answer:

Add a RequiredFieldValidator control and set its ControlToValidate property to oPaymentTypeList. Set the lnitialdValue property of the RequiredFleldVaildator control to Select.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

ASP.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

ASP.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it