set focus in a ASP.NET webpage

R

Remco Groot Beumer

Hello,

I would like to know if it is possible in ASP.NET to set the focus to a

control. I would like to make it possible for users to fill in a form. The

form contains textboxes and dropdownlists. When the user makes a selection

in a dropdownlist, certain default-values in textboxes are set. I use the

AutoPostBack=True property in the dropdownlist, but after the page has been

transferred back to the server, the control has also lost it's focus. That's

annoying for users, especially when there are more than 1 dropdownlists that

postback to the server.

Greetings,

Christian.
 
S

Scott M.

When an ASP.NET page is processing its code, it's doing so on the server.
And, that is well before the client actually receives the page.

Setting focus should really be done with traditional client-side scripting
(JavaScript).
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top