70-316  Exam

Exam # of questions Description  Update
70-316 192 Microsoft 70-316 Developing Windows-based Applica... 02/15/2011
[Practice Test]   [Download Study Guide(PDF)]  [Update Exam]

70-316 - Exam Information
  • Description:Microsoft 70-316 Developing Windows-based Applications with Microsoft Visual C# .NET
  • Passing Score:75%
  • Practice Test - Number of questions:192 questions
  • Simulation Test - Number of questions:192 questions
  • Simulation Test Duration:41 minutes
  • Has explanations:Yes

Question of the day

You use Visual Studio .NET using C# to create a payment form for customers of GeekBooks Inc. The form enables users to enter credit card payment information. The form contains a text box named txtCreditCardNo. If a user enters an invalid telephone number, the form must notify the user of the error. You use a function named ValidateCreditCardXMLService that calls an XML web service to validate the credit-card number entered. You include an ErrorProvider control named ErrorProvider1 in your form. Which additional code segment should you use?

Answer(s)

  1. Private Sub txtCreditCard_Validated _ (ByVal sender As Object, _ ByVal e As System.EventArgs) _ If ValidateCreditCardXMLService() = False then _ ErrorProvider1.SetError(txtCreditCard, "Invalid Credit Card.") End If End Sub
  2. Private Sub txtCreditCard_Validated _ (ByVal sender As Object, _ ByVal e As System.EventArgs) _ Handles txtCreditCardNo.Validated If ValidateCreditCardXMLService() = False then _ ErrorProvider1.SetError(txtCreditCard, "Invalid Credit Card.") End If End Sub
  3. Private Sub txtCreditCard_Validating _ (ByVal sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) _ Handles txtCreditCardNo.Validating If ValidateCreditCardXMLService() = False then _ ErrorProvider1.GetError(txtCreditCard) End IF End Sub
  4. Private Sub txtCreditCard_Validated _ (ByVal sender As Object, _ ByVal e As System.EventArgs) _ Handles txtCreditCardNo.Validated If ValidateCreditCardXMLService() = False then _ ErrorProvider1.GetError(txtCreditCard) End If End Sub
  5. Private Sun txtCreditCard_Validating _ (ByVal sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) _ Handles txtCreditCardNo.Validating If ValidateCreditCardXMLService() = False then _ ErrorProvider1.UpdateBinding() End If End Sub
  6. Private Sub txtCreditCard_Validated _ (ByVal sender As Object, _ ByVal e As System.EventArgs) _ Handles txtCreditCardNo.Validated If ValidateCreditCardXMLService() = False then _ ErrorProvider1.UpdateBinding() End If End Sub
Correct Answer

Private Sub txtCreditCard_Validated _ (ByVal sender As Object, _ ByVal e As System.EventArgs) _ Handles txtCreditCardNo.Validated If ValidateCreditCardXMLService() = False then _ ErrorProvider1.SetError(txtCreditCard, "Invalid Credit Card.") End If End Sub