clear textboxes

  • Thread starter Thread starter Portroe
  • Start date Start date
P

Portroe

I think I have asked this before, :-) but old posts are deleted it seems,

How do you clear textboxes in a form, (on submit)?


thanks

portroe
 
Hi portroe,

I asume it is a webform,
most simple is texbox1.visible = false,
It is not gone, but I think that this is for a not dynamicly built textbox
on a webform the most simple.

If you did build it dynamicly (or on a winform) you can also say
me.controls.remove(textbox1)

I hope this helps,

Cor
 
is this webforms ?

I think I have asked this before, :-) but old posts are deleted it
seems,

How do you clear textboxes in a form, (on submit)?


thanks

portroe
 
I think I was vague with my question,

I meant to clear the contents of the text box, (after I have read the data)

thanks
 
Hi,

Dim ctrl As Control

For Each ctrl In Me.Controls

If TypeOf ctrl Is TextBox Then ctrl.Text = ""

Next


Ken
 
* "Ken Tucker said:
Dim ctrl As Control

For Each ctrl In Me.Controls

If TypeOf ctrl Is TextBox Then ctrl.Text = ""

Next

Only a little note: This won't clear nested textboxes.
 
Back
Top