Re: Clear all TextBox on a Form
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Aug 2007 15:38:10 -0400
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]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"RP" <rpk.general@xxxxxxxxx> wrote in message
news:1187119751.419037.247560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to clear all the Text Boxes on the Form. Is there any short
method to avoid clearing them one by one.
.
- Follow-Ups:
- Re: Clear all TextBox on a Form
- From: RP
- Re: Clear all TextBox on a Form
- References:
- Clear all TextBox on a Form
- From: RP
- Clear all TextBox on a Form
- Prev by Date: Re: service
- Next by Date: Re: unbuffered file IO?
- Previous by thread: Clear all TextBox on a Form
- Next by thread: Re: Clear all TextBox on a Form
- Index(es):
Relevant Pages
|
Loading