cleanning all textboxes on a form with a single code block (Resolved)
hi all,
I used to use this segment in VB6 to clear all textboxes on a form, but it seems to have difficulties running on VB.Net
VB Code:
dim ctl as control
for each ctl in controls
if typeof ctl is textbox then ctl.text = ""
next
Can anyone advise me, what is the equivelant code in VB.Net
\THX in Advance
BST RGDS
Re: cleanning all textboxes on a form with a single code block
Quote:
Originally posted by maged
hi all,
I used to use this segment in VB6 to clear all textboxes on a form, but it seems to have difficulties running on VB.Net
VB Code:
dim ctl as control
for each ctl in controls
if typeof ctl is textbox then ctl.text = ""
next
Can anyone advise me, what is the equivelant code in VB.Net
\THX in Advance
BST RGDS
ya code runs on my time machine mate