Question: How do I fill a textbox with text if it is empty? I am using VB.NET.

Answer: 
default text handling in a text box

```
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    TextBox1.Text = "Default Text" ' initialize the text box 
End Sub

```

clear the text when the cursor is in the text box

```
Private Sub TextBox1_GotFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1_GotFocus
    TextBox1.Text = "" ' clear the text box for typing
End Sub

```

If the text box remains empty after data change then the default text comes again

```
Private Sub TextBox1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1_LostFocus
    TextBox1.Text = "" ' clear the text box for typing
End Sub

```
I would create a class that inherits TextBox and do two things with it:

* Add DefaultText string property
* Override the Text setter to always set this DefaultText if the new Text value is String.Empty