Anjola Anjola - 1 month ago 8
C# Question

How to clear a textbox once a button is clicked in WPF?

How can I clear a

textbox
once a button is clicked in the WPF application, I know I have to do it in click method of the button but what code should I use for the mentioned purpose?

Answer

Give your textbox a name and then use TextBoxName.Text = String.Empty;

Comments