Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Text Clear

How do you clear a textbox after you made an invalid entry: ie use a messageBox OK button to clear textbox.
0
Barako2
Asked:
Barako2
  • 2
1 Solution
 
ptakjaCommented:
Textbox1.Text = ""

Or

Textbox1.Text = String.Empty
0
 
ptakjaCommented:
If MessageBox.Show("Press OK to clear Textbox", "Clear TextBox", MessageBoxButtons.OK, MessageBoxIcon.Question) = DialogResult.OK Then
   TextBox1.Text = String.Empty
End If
0
 
Barako2Author Commented:
Textbox1.Text = String.Empty  Works better for my application Thanks man.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now