How to select text in textboxs by clicking on it?

  • Thread starter Thread starter Lily
  • Start date Start date
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?
 
Hi,

add this attribute to the TextBox:

onclick="this.select()"

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