Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset textbox in VB.NET 1

Status
Not open for further replies.

frmorris

Programmer
Aug 4, 2005
22
US
I am developing a web form in vb.net. I would like for the textboxes to be reset once the user has hit the submit button after they have entered some data. Could someone help me?
 
you can do this:

Textbox.Text = ""

in the onlick event of the button

Jim
 
or:
disable viewstate for those controls???

Known is handfull, Unknown is worldfull
 
vb.. I tested that idea. I set a textbox to viewstate = false, yet the values still showed on postback. I thought that would prevent that from happening.
 
Thanks jbenson001. That worked. I can't believe it was that simple. I have been trying to figure this out for days.
 
VB ... Yes I saw that article. Initially when I saw this post I thought of EnableViewState. I tested it on a page with a textbox and button. But somehow it still keeps the state. Hummm...
 
yup, same experience here...

Known is handfull, Unknown is worldfull
 
defenitely not infact i thought i was going through the roof with atleast one "sure" command failing in this manner for me (its a web.config headache) ;)...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top