Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what is the purpose of textbox.text property
Posted
Comments
Sergey Alexandrovich Kryukov 2-Sep-13 12:52pm    
What's wrong with reading MSDN documentation?
—SA
[no name] 2-Sep-13 13:57pm    
Pretty much the exact same answer you already have http://www.codeproject.com/Answers/644574/how-to-display-value-of-variable-in-vb-net#answer3

The Text property allows you to get and set the value that the user will enter, or see.

For example:
C#
Console.WriteLine(myTextBox.Text);
Would print the value the user entered and:
C#
myTextBox.Text = "Default value";
Would put a default into the box so the user didn't always have to type anything.
 
Share this answer
 
Comments
ridoy 2-Sep-13 12:59pm    
5ed!
An addition with OriginalGriff's answer :
Text property specifies the text to be displayed in the TextBox at runtime.
Sample :
VB
Private Sub Form_Load ()
    Text1.Text = "This is an example"
    Text1.Text = Text1.Text & " of VB textbox sample."
End Sub
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900