Text Clear

Posted on 2004-11-25
Last Modified: 2010-04-23
How do you clear a textbox after you made an invalid entry: ie use a messageBox OK button to clear textbox.
Question by:Barako2
    LVL 14

    Accepted Solution

    Textbox1.Text = ""


    Textbox1.Text = String.Empty
    LVL 14

    Expert Comment

    If MessageBox.Show("Press OK to clear Textbox", "Clear TextBox", MessageBoxButtons.OK, MessageBoxIcon.Question) = DialogResult.OK Then
       TextBox1.Text = String.Empty
    End If

    Author Comment

    Textbox1.Text = String.Empty  Works better for my application Thanks man.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now