GSSP-NET · Question #435
Maria works as a Software Developer for BlueWell Inc. She develops an application, named App1, using Visual C# .NET. App1 contains a Form control, named Form1, for collecting users' contact…
The correct answer is B. public void TextBox1_Validating(object sender. See the full explanation below for the reasoning.
Question
Maria works as a Software Developer for BlueWell Inc. She develops an application, named App1, using Visual C# .NET. App1 contains a Form control, named Form1, for collecting users' contact information. Form1 contains a TextBox control, named TextBox1. App1 requires users to enter data in TextBox1. Maria writes a method, named Method1, to validate the entered data. She adds an ErrorProvider control, named Control1, to Form1. Maria wants to ensure that App1 notifies the users if they enter invalid data in TextBox1. Which of the following code will she use to accomplish this?
Options
- Apublic void TextBox1_Validating(object sender, System.CancelEventArgs e) {
- Bpublic void TextBox1_Validating(object sender,
- Cpublic void TextBox1_Validated(object sender,
- Dpublic void TextBox1_Validated(object sender,
How the community answered
(17 responses)- B82% (14)
- C6% (1)
- D12% (2)
Community Discussion
No community discussion yet for this question.