Selecting text after TextBox.Focus() is executed

D

David C

I see that the .Focus() method is new in .NET 2.0, which I think is
handy.

But is there a way to make text in a textbox selected when the focus
is set in it? This would be equivalent to calling .select() in
javascript.
 
K

Kevin Spencer

Use client-side JavaScript to handle the onfocus event of the text box and
call the select method.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top