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.
 
Dim ctrl As Control
Only a little note: This won't clear nested textboxes.
One little extra note: If it is a webform it won't clear any textbox in this
way

:-))

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top