Question

31. Suppose an application’s GUI has two TextBox controls named firstNameTextBox and lastNameTextBox for users’ input....

31. Suppose an application’s GUI has two TextBox controls named firstNameTextBox and lastNameTextBox for users’ input. There is also a Label control named fullNameLabel. Write C# statement(s) to combine the first and the last names with a space in between and display the full name in the fullNameLabel. (proper Variables Must be declared)

USING C#

Homework Answers

Answer #1

Here, your requirement is only only for the statement. So I am not providing you whole code for that

In your application,

firstNameTextBox has first name value.

You can get it by firstNameTextBox.Text

lastNameTextBox has last name value.

You can get it by lastNameTextBox.Text

To set the given value to fullNameLabel contol, you can use fullNameLabel.Text

means fullNameLabel.Text = "Whatever you want to set"

So, to append first name and last name and show it in label field code is as below.

string firstName, lastName;

firstName = firstNameTextBox.Text; //get firstname

lastName = lastNameTextBox.Text; //get lastname

fullNameLabel.Text = firstName + " " + lastName //append firstname and lastname using space

OR

Second method is you can directly add without assignment as below

fullNameLabel.Text = firstNameTextBox.Text + " " + lastNameTextBox.Text; //append firstname and lastname using space

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Use a few sentences to describe the problem given below . Also, Identify the nouns and...
Use a few sentences to describe the problem given below . Also, Identify the nouns and verbs used in the below project descriptions.  Identified nouns, list the ones that are necessary to define variables in your program. For each variable, specify its name, data type, and what information it is used to store. Write the pseudo code algorithm (i.e. algorithm steps) to solve this problem. (For the base salaries and commission rates use constants instead to keep these values. Use the...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
Need in C language also need full documentation/explanation of each line A student has established the...
Need in C language also need full documentation/explanation of each line A student has established the following monthly budget: Budget Categories Budgeted amount ----------------------------------------------------- Housing $ 580.00 Utilities $ 150.00 Household Expenses     $ 65.00 Transportation $ 50.00 Food $ 250.00 Medical $ 30.00 Insurance $ 100.00 Entertainment $ 150.00 Clothing $ 75.00 Miscellaneous $ 50.00 ---------------------------------------------------- Write a program that declares a MonthlyBudget structure designed with member variables to hold each of these expense categories. The program should define...
Now that you have reviewed information about The Adrenaline Hut, you are ready to begin the...
Now that you have reviewed information about The Adrenaline Hut, you are ready to begin the first step in the accounting cycle, recording transactions. On this page of the practice set, you are asked to record transactions that occurred during the first week of June into the company's journals and post the appropriate entries to the ledger accounts. The following transactions occurred throughout the first week of June: Week 1 Date Transaction description 1 Issued Cheque No. 646 for $8,800...
Compile and execute the application. You will discover that is has a bug in it -...
Compile and execute the application. You will discover that is has a bug in it - the filled checkbox has no effect - filled shapes are not drawn. Your first task is to debug the starter application so that it correctly draws filled shapes. The bug can be corrected with three characters at one location in the code. Java 2D introduces many new capabilities for creating unique and impressive graphics. We’ll add a small subset of these features to the...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
1) Describe an example of each of the following that may be found of your kitchen:...
1) Describe an example of each of the following that may be found of your kitchen: Explain how your choice falls into this category, and if there is a chemical name or symbol for it, provide that as well. Provide a photo of your example with your ID card in it. a) a compound b) a heterogeneous mixture c) an element (symbol) Moving to the Caves… Lechuguilla Caves specifically. Check out this picture of crystals of gypsum left behind in...
ATHI AND DARRIN LOVETTE CASE: Kathi and Darrin Lovette Background Kathi and Darrin Lovette, both age...
ATHI AND DARRIN LOVETTE CASE: Kathi and Darrin Lovette Background Kathi and Darrin Lovette, both age 63, have been married for 40 years, are both in good health, and they are citizens and residents of Louisiana. They expect to work until age 66 to 70. Kathi and Darrin live in a community property state. They have the following children and grandchildren: Children Age Grandchildren Elizabeth Age 40 4 children (ages 15, 14, 13 & 12) James Age 35 3 children...
As you saw from the lab PowerPoint slides last week, you will be doing a research...
As you saw from the lab PowerPoint slides last week, you will be doing a research study looking at ‘Aggression Priming” for your first paper. For this week’s discussion, I want you to discuss with your group what you think this study is about. What is the hypothesis? What theory does it come from? What do you predict will happen (do you expect something different than the hypothesis in the researcher instructions? If so, what and why?)? Do you think...
Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe,...
Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe, NM 87501. Lance works for the convention bureau of the local Chamber of Commerce, while Wanda is employed part-time as a paralegal for a law firm. During 2016, the Deans had the following receipts: Salaries ($60,000 for Lance, $41,000 for Wanda) $101,000 Interest income—    City of Albuquerque general purpose bonds $1,000    Ford Motor company bonds 1,100    Ally Bank certificate of deposit 400 2,500 Child...