simple coding help!

jamesmademe

New member
Joined
Nov 2, 2008
Messages
1
Programming Experience
Beginner
I have to create a text box, a button and a label.

the person has to enter a number in the text box then press the button and the number will appear in the label


I did know this but have totally forgot how to do it, but HOW DO I CODE THIS?
 
This looks like the most elementary homework assignment.

The button's Click event should contain code that copies the Text property of the textbox to the label's Text property. It will use the = symbol to copy from the expression on the right side (the textbox) to the expression on the left side (the label) of the = sign.

I strongly suggest you read the assigned chapter in your textbook for details. Also, pay better attention in class and take notes!
 
This will do it.

Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
lblMessage.Text = txtText.Text
End Sub
 
Back
Top