Set Focus to a TextBox

S

Steve Murphy

How do you set focus to a particular TextBox in ASP.NET?

Thank you in advance.
 
B

Brock Allen

In 2.0 this is built in via the SetFocus() API. In 1.1 you'll have to build
your own client javascript that does this. It's fairly easy with Page.RegisterStartupScript().
 
S

Steve Murphy

Brock Allen said:
In 2.0 this is built in via the SetFocus() API. In 1.1 you'll have to
build your own client javascript that does this. It's fairly easy with
Page.RegisterStartupScript().

Thanks, that works.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top