set focus in a ASP.NET webpage

  • Thread starter Thread starter Remco Groot Beumer
  • Start date Start date
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.
 
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).
 
Back
Top