473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Trying to find a better way to clear textboxes

Hi,
Here is part of one sub where I want to clear all textboxes (there are
three subs where I do this, one contains more textboxes, the other is
below and the final one looks the same but omits the
txtInvLoc.SelectedItem box). Some of the examples online didn't work out
to well for me. I want a shorter way to clear the fields, but also
another option that clears all fields but one: txtInvLoc.SelectedItem.
Can someone direct me to an example or show me how I can accomplish this
task? Thanks in advance for the assistance.

Sub ClearForm (Source As Object, Args As EventArgs)

txtSupName.Text = ""
txtSupCD.Text = ""
txtSupsfx.Text = ""
txtAcctAmt.Text = ""
txtInvNum.Text = ""
txtInvDate.Text = ""
txtInvLoc.SelectedItem.Value = ""
txtInvAmt.Text = ""
txtTerms.SelectedItem.Value = ""
txtPay.SelectedItem.Value = ""
txtCurr.SelectedItem.Value = ""

End Sub
(there are actually textboxes and dropdownlists(selected.value).

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1076

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: T. Wintershoven | last post by:
Hello, I have a few textboxes placed on a SSTab control devided over 3 tabs Is there a way to clear all textboxes in one time in stead of one by one. Someone told me "Use for each item...
6
by: Tim Whelan via DotNetMonster.com | last post by:
Hi I am developing an asp.net web application using c# and having trouble trying to display integer values, that I have taken from the database, correctly on my webform textboxes. The values are...
9
by: Peter Afonin | last post by:
Hello: I need to clear all textboxes on the webform after the data has been submitted. How can I do this in one step? I found a C# code: // get a reference to your form control Control frm...
2
by: Paul K | last post by:
I'm trying to understand how to implement logic I currently have in an ASP application in an ASP.NET application. In ASP I have an entry application that draws an html table for a specified...
1
by: Chris | last post by:
Hi, I have a page with quite a few textboxes and dropdownlist controls. How can I clear the textboxes and reset the dropdownlist after the data is sent to the database? Do I have to perform ...
8
by: Portroe | last post by:
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
2
by: lanem | last post by:
I have an asp.net 2.0 page with a couple of textboxes and a gridview. On postback from a rowcommand from the gridview, the textboxes are clearing out. No other postbacks from the page are causing...
2
abehm
by: abehm | last post by:
how do I access a method that will clear textboxes in a user control, from a btnClick event in another user control on the same page?
6
by: RP | last post by:
I want to clear all the Text Boxes on the Form. Is there any short method to avoid clearing them one by one.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.