Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

What are the differences of clearing textboxes' text between:

 

TextBox.Text = ""

TextBox.Text = Nothing

TextBox.ResetText()

 

Eventhough there are probably a handful I left out, they all appear to accomplish the same thing.

 

Thanks

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Guest mutant
Posted

Those two clear the TextBox:

 

TextBox.Text = ""

TextBox.Text = Nothing

 

This returns the TextBox to its default value, so if you create your own control that uses this textbox you can put some default text in it, and it will return to it.

 

TextBox.ResetText()

  • *Experts*
Posted

Heh, me neither, Robby. :) The method I use to clear a textbox

is TextBox.Clear(), which is essentially the same as TextBox.Text = ""

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...