F How to clear TextBox data in C# | CodeTheta

How to clear TextBox data in C#

August 17, 2019

To find TextBox name go to TextBox properties section and find the name under Design section.

Code :
private void Clear() {
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox5.Text = "";
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";
}

after that call the Clear() function in a button event for function calling.

IDE Used To Test This Code : Microsoft Visual Studio

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment