default button in password recovery control

K

Keith G Hicks

asp.net 2.0

I have an asp:Login control and an asp:passwordRecovery control on the same
page. The login control is above the recovery one.

When I open the page, I'm setting the focus to the login control. I type in
my user name and password and hit ENTER and it logs me in. That's fine.

When I open the page and tab (or mouse) to the UserName box in the
PasswordRecovery control and hit ENTER, the button in the Login control
fires but want the one on the PasswordRecovery to be activated instead.

I tried to put them each in an update panel but that didn't solve the
problem. How can I solve this?

Thanks,

Keith
 
K

Keith G Hicks

Well I tried this:
http://www.beansoftware.com/ASP.NET-Tutorials/Accept-Enter-Key.aspx

But I get this error:

The DefaultButton of 'PwdRecoveryPanel' must be the ID of a control of type
IButtonControl.

password recovery control in an asp panel as follows:

<asp:panel id="PwdRecoveryPanel" runat="server"
DefaultButton="SubmitButton">

SubmitButton is the ID of the button in the recovery control. The recovery
control's ID is PasswordRecovery1. Funny thing is that I cannot even refer
to that button in my vb code. It doesn't come up in intellisense. I'm
wondering if that's the problem.

I tried this too and it didn't work:

<asp:panel id="PwdRecoveryPanel" runat="server"
DefaultButton="PasswordRecovery1.SubmitButton">


Keith
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top