Question: Using Visual Studio, create the following: Task 1: Create a UserControl called LoginPasswordUserControl. The LoginPasswordUserControl contains a Label (loginLabel) that displays the string Login:, a
Using Visual Studio, create the following:
Task 1:
Create a UserControl called LoginPasswordUserControl. The LoginPasswordUserControl
contains a Label (loginLabel) that displays the string "Login:", a TextBox (loginTextBox) where the user inputs a login name, a Label (passwordLabel) that displays the string "Password:" and finally, a TextBox (passwordTextBox) where a user inputs a password.
Task 2:
LoginPasswordUserControl must provide Public read-only properties Login and Password that allow an application to retrieve the user input from loginTextBox and passwordTextBox.
Make sure that both of the controls properties are exposed to the developers form, i.e., the form that hosts the composite control LoginPasswordUserControl.
Task 3:
Use the composite control in a Windows application that will have a button (OK) and a label as shown below. Write code necessary to display the login and password entered by the user on the form. Run the program and click the OK button to display the information entered.
Task 4:
Now add 2 labels and set their name properties: lblFN (passwordTextBox) and lblLN (loginTextBox). Add to text boxes that correspond to each of the labels you created. Add another button named btnDisplay to the host form. The button should read DISPLAY. In the click event of this button write appropriate code to display a message box with your full name displayed on it. Run the program one more time now and click the Display button to display the message box with your full name on it.
Task 5: Include data validation code as required.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
