473,325 Members | 2,308 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,325 software developers and data experts.

How do I clear text from textbox?

103 100+
I would like to create a method that can be called that will clear a textbox. The scenario is that I click in a text box and it clears the text that resides inside. I dont want to create a separate method for each textbox, but rather I would like it to clear which ever textbox I click in calls the method. Can you help please?
Jun 2 '11 #1
1 1942
Brian Connelly
103 100+
So, sorry for taking up space, but I figured it out. To create a general clear textbox, I wrote a method like this...
Expand|Select|Wrap|Line Numbers
  1. private void clickClear (Object sender, EventArgs e)
  2. this.activecontrol.text="";
  3. }
  4.  
Jun 2 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bob | last post by:
Hi, I have a website in a Linux/Apache shared hosting environment and have been given access to the MySQL server running on the same machine. To access this database from PHP, I have to call...
3
by: Targa | last post by:
How can I clear a text field by clicking on a button? Ive searched the web and found tons of scripts that will clear text just entered but I am displaying results from a database into a text area...
5
by: Jason Huang | last post by:
Hi, In my C# Windows Form MyForm, it has many TextBoxes, e.g., txtName, txtID, txtAddress, ..., it also has many ComboBoxes, e.g., cboState, cboGender. How do I clear all those controls's Text...
0
by: moi | last post by:
Hello ! I have create a logon page to my Active directory's user with ASP.NET 2 and active directory membership. After a successful logon the user is been prompt to change his password and...
0
by: John Hall | last post by:
We are using Visual Web Developer 2005 Express and the ASP.NET administration tool to create users. After we implemented <asp:passwordrecovery ... /> new passwords are emailed to the user instead...
1
by: Danial | last post by:
Hi, I am using asp.net 2 and i want to blank all textbox data of one form with (for each control) and i write following coding in button control, but it did not work. Dim ctl As Control ...
1
by: Alex | last post by:
Hi. I have... well.... not very many computer-literate users to my web- site. For the textbox which expects an email address, for instance, I had to enter a default text like "Email..."...
1
by: nikhilchandra | last post by:
how clear text field in struts onsubmit event of <html:form> tag
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.
1
by: Ozone | last post by:
Hi, I need to know how to validate encrypted column which may by chance loads clear text or unencrypted value. An exception should be triggered if encrypted column receives any clear text data....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.