Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to clear pre-filled textBox on selection

Avatar of PowerEdgeTech
PowerEdgeTechFlag for United States of America asked on
JavaScriptASP.NETVisual Basic.NET
10 Comments1 Solution1483 ViewsLast Modified:
I have a simple asp:textbox in a form on a webpage.  I would like to prefill the box with the type of information expected (I.e. Name, Email, Phone, etc.) instead of having to label the box.  I have the boxes pre-filled using Text="Name", but I would like to have the pre-filled content cleared when the user clicks in the box - or at least highlighted when clicked to be overwritten by the user's input.

Using focus seems to work on JavaScript INPUT field, but I can't get it to work the same way on asp:textbox.  Is there an easy/good way to do this?

Be nice and keep it simple (if possible) ... I can follow most code, but I do consider myself a beginner :)

Avatar of kris_per
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answers