| |
GeekInterview.com > Interview Questions > Microsoft > VB.NET
| Print | |
Question: Windows-based application code segment
Answer: You develop a Windows-based application that includes the following code segment. (Line numbers are included for reference only.) 01 Public Sub password_Validating (ByVal sender As _ 02 Object, ByVal e As _ 03 System.ComponentModel.CancelEventArgs) 04 Handles password.Validating 05 If ValidPassword() = False Then 06 'Insert new code. 07 End If 08 End Sub You must ensure that users cannot move control focus away from textPassword if ValidPassword returns a value of False. You will add the required code on line 6. Which code segment should you use?
A. e.Cancel = True
B. sender = textName
C. password.AcceptsTab = False
D. password.CausesValidation =False
|
| August 08, 2009 04:56:58 |
#2 |
| MrinalShendey1325 |
Member Since: July 2009 Total Comments: 2 |
Windows-based application code segment |
e.cancle = True
If the input in the control does not fall within required parameters,the property within your event handler can be used to cancel the Validating event and return the focus to the control. |
| |
Back To Question | |