Dozo_1st
September 9th, 2004, 07:52 AM
How do I put the focus on a textbox on a webform?
After a postback, the webform is reloaded and the focus on the textbox is lost.
e.g. I have 2 textboxes: txt1 and txt2.
txt1 has AutopostBack = true and Index=1
txt2 has Index=2
After using the TAB-key, the PostBack is necessary for updating some objects on the webform. But when the page is reloaded by the autopostback, the focus is lost and the cursor does not reach txt2. :eek:
How do I get the focus on txt2? And how do I do this if I have more controls on the same form which also have autopostback?
Thank you very much in advance!
Dozo
After a postback, the webform is reloaded and the focus on the textbox is lost.
e.g. I have 2 textboxes: txt1 and txt2.
txt1 has AutopostBack = true and Index=1
txt2 has Index=2
After using the TAB-key, the PostBack is necessary for updating some objects on the webform. But when the page is reloaded by the autopostback, the focus is lost and the cursor does not reach txt2. :eek:
How do I get the focus on txt2? And how do I do this if I have more controls on the same form which also have autopostback?
Thank you very much in advance!
Dozo