Re: Clear all TextBox on a Form



Oh, I want that itself. Can you please illustrate on how to use
ControlCollection?

On Aug 15, 12:38 am, "Nicholas Paldino [.NET/C# MVP]"
<m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
No, there isn't. You will have to cycle through all the textboxes on
the form, and then clear the text out yourself. It should be easy enough to
do, given a ControlsCollection instance, you can use the "as" operator to
determine if the control is a TextBox or not (or, TextBoxBase). If it is,
then you can set the Text property to an empty string.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx


.