ASP.net AJAX Modal Popup Login Box Default Button and Focus
Posted on 2012-03-29
I have an asp:LoginStatus control that is the target conrol ID for a modal popup extender. The modal popup has an asp:login control inside the panel with two text boxes and two buttons.
I am having trouble setting the default button and the initial focus when the modal is shown.
All I need to accomplish is the following:
After the modal.show function is called...
1. Set focus to the username textbox.
2. Call the server side click event for the login button when the Enter button is pressed.
I have tried setting the default button of the panel, but that gave me an error stating that I needed to use a control of type iButton.
I tried setting the OkControlID using the clientID of the username, that seemed to do nothing.
Currently, when you press the enter button when the popup is shown, the popup disappears.
Please Help....I don't know why this is so dificult for me....