PDA

Click to See Complete Forum and Search --> : determining the type of control


ayan
Feb 22nd, 2004, 10:23 PM
halu,

i'm a new to this thing.... i have a problem dealing with the determination of the control. this is about clearing.... i have a pseudo code below...

- foreach(control c in groupbox.controls)
- if c is textbox, c.text=string.empty

thanx very much...

--ayan

Pirate
Feb 23rd, 2004, 01:42 AM
Example ,

foreach (Control c in this.Controls)
{
if (c is TextBox)
{
c.Text="";
}
}

ayan
Feb 23rd, 2004, 02:20 AM
thanx Pirate... you are the man... :D

CornedBee
Feb 23rd, 2004, 04:10 AM
Remarkable: :)
if c is textbox
if (c is TextBox)