I am trying to set focus on a button of a modal window(that is opening a new page). The problem i am facing is if am using only the keyboard to navigate in the web page it is stopping at the maximize button and not coming back to the point where it started. Can you please tell me how to set index to a control? I have the following controls on the modal window. A label where text is dynamically filled. The number radio buttons are dynamically created There is a button to load the next page in the modal window.
So my question is how to set focus on this button and also keep the tab index rotating starting from the button through all the controls and again to the start, all within the modal window.
First of all, welcome to Stackoverflow!
The solution for the focus issue, is pretty simple, where you should open the code-behind file of the dialog itself, and in the Page_Load event simply type:
buttonId.Foucs()
'buttonId' will be of course the id of your button.
Most of the controls have attribute called TabIndex, so you can add it to each input and determine the sequence when pressing tab key.