How to select text in textboxs by clicking on it?

L

Lily

Hi there,
I have 10 textboxs on a page. When tab into a textbox, the entire text
($0.00) in a textbox is selected in blue. How do I have this effect by
single clicking on the textbox?
 
T

Teemu Keiski

Hi,

add this attribute to the TextBox:

onclick="this.select()"

For Example:
<asp:TextBox id="TextBox1" onclick="this.select()" runat="server">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top